1- import React , { useState , useEffect } from 'react'
2- import { Table } from 'antd'
1+ import React from 'react'
32import { Smartphone , Monitor , Rocket } from 'lucide-react'
43import PageContainer from '@stateless/PageContainer'
54import FixTabPanel from '@stateless/FixTabPanel'
@@ -28,7 +27,6 @@ import HePng from '@assets/images/he.png'
2827import SongPng from '@assets/images/song.png'
2928import XuePng from '@assets/images/xue.png'
3029import OneTimePasscode from '@stateless/OneTimePasscode'
31- import styles from './index.module.less'
3230
3331const companies = [ SpringPng , HePng , SongPng , XuePng ]
3432
@@ -85,68 +83,20 @@ const fixTabsData = [
8583 } ,
8684]
8785
88- const tabs = [
89- {
90- title : 'Product' ,
91- value : 'product' ,
92- content : (
93- < div className = "relative h-full w-full overflow-hidden rounded-2xl bg-linear-to-br from-purple-700 to-violet-900 p-10 text-xl font-bold text-white md:text-4xl" >
94- < p > Product Tab</ p >
95- </ div >
96- ) ,
97- } ,
98- {
99- title : 'Services' ,
100- value : 'services' ,
101- content : (
102- < div className = "relative h-full w-full overflow-hidden rounded-2xl bg-linear-to-br from-purple-700 to-violet-900 p-10 text-xl font-bold text-white md:text-4xl" >
103- < p > Services tab</ p >
104- </ div >
105- ) ,
106- } ,
107- {
108- title : 'Playground' ,
109- value : 'playground' ,
110- content : (
111- < div className = "relative h-full w-full overflow-hidden rounded-2xl bg-linear-to-br from-purple-700 to-violet-900 p-10 text-xl font-bold text-white md:text-4xl" >
112- < p > Playground tab</ p >
113- </ div >
114- ) ,
115- } ,
116- {
117- title : 'Content' ,
118- value : 'content' ,
119- content : (
120- < div className = "relative h-full w-full overflow-hidden rounded-2xl bg-linear-to-br from-purple-700 to-violet-900 p-10 text-xl font-bold text-white md:text-4xl" >
121- < p > Content tab</ p >
122- </ div >
123- ) ,
124- } ,
125- {
126- title : 'Random' ,
127- value : 'random' ,
128- content : (
129- < div className = "relative h-full w-full overflow-hidden rounded-2xl bg-linear-to-br from-purple-700 to-violet-900 p-10 text-xl font-bold text-white md:text-4xl" >
130- < p > Random tab</ p >
131- </ div >
132- ) ,
133- } ,
134- ]
135-
13686const customCommandMap = {
13787 npm : 'npm run shadcn add button' ,
13888 yarn : 'yarn shadcn add button' ,
13989 pnpm : 'pnpm dlx shadcn@latest add button' ,
14090 bun : 'bun x shadcn@latest add button' ,
14191}
14292
143- const dateDifference = ( date1 , date2 ) => {
144- const d1 = new Date ( date1 )
145- const d2 = new Date ( date2 )
146- const diffTime = Math . abs ( d2 - d1 )
147- const diffDays = Math . ceil ( diffTime / ( 1000 * 60 * 60 * 24 ) )
148- return diffDays
149- }
93+ const animatedListItems = Array . from ( { length : 10 } , ( _ , index ) => ( {
94+ id : `animated- ${ index + 1 } ` ,
95+ } ) )
96+
97+ const stickyCardItems = Array . from ( { length : 4 } , ( _ , index ) => ( {
98+ id : `sticky- ${ index + 1 } ` ,
99+ } ) )
150100
151101const tagCardList = [
152102 {
@@ -315,7 +265,7 @@ const ProDemo = () => {
315265 return (
316266 < FixTabPanel >
317267 < PageContainer >
318- < OneTimePasscode length = { 6 } variant = "compact" onComplete = { ( code ) => console . log ( 'OTP Code:' , code ) } />
268+ < OneTimePasscode length = { 6 } variant = "compact" onComplete = { ( ) => { } } />
319269 < MusicPlayer />
320270 < TransferHistory />
321271 < FixCarousel />
@@ -338,17 +288,13 @@ const ProDemo = () => {
338288 < LogoSlider companies = { companies } />
339289 < section style = { { height : 240 , overflow : 'hidden' , margin : 20 } } >
340290 < AnimatedList >
341- { Array . from ( { length : 10 } , ( ) => ( {
342- id : Math . random ( ) ,
343- } ) )
344- . flat ( )
345- . map ( ( item , index ) => (
346- < div key = { item ?. id } className = "flex flex-col items-center justify-center gap-4" >
347- < div className = "flex items-center justify-center gap-4" >
348- < div className = "h-16 w-100 rounded-full bg-gradient-to-br from-purple-500 to-blue-500" />
349- </ div >
291+ { animatedListItems . map ( ( item ) => (
292+ < div key = { item . id } className = "flex flex-col items-center justify-center gap-4" >
293+ < div className = "flex items-center justify-center gap-4" >
294+ < div className = "h-16 w-100 rounded-full bg-gradient-to-br from-purple-500 to-blue-500" />
350295 </ div >
351- ) ) }
296+ </ div >
297+ ) ) }
352298 </ AnimatedList >
353299 </ section >
354300
@@ -374,7 +320,7 @@ const ProDemo = () => {
374320 ] }
375321 className = "my-4 rounded-xl"
376322 />
377- < StickyCard cards = { [ ... Array . from ( { length : 4 } , ( ) => ( { id : Math . random ( ) } ) ) ] } />
323+ < StickyCard cards = { stickyCardItems } />
378324 < section style = { { marginBottom : '15px' } } >
379325 < OrgChart />
380326 </ section >
0 commit comments