@@ -7,38 +7,114 @@ import { Premium } from "./_components/premium";
77import { useConvexAuth } from "convex/react" ;
88import { useEffect , useState } from "react" ;
99import { Skeleton } from "@/components/ui/skeleton" ;
10+ import { useRouter } from "next/navigation" ;
1011
1112export default function Landing ( ) {
1213 const { isLoading } = useConvexAuth ( )
14+ const router = useRouter ( )
1315 const [ isReady , setIsReady ] = useState ( false )
1416
1517 useEffect ( ( ) => {
18+ const redirectValue = localStorage . getItem ( "redirect" )
19+ if ( redirectValue === "true" ) {
20+ router . replace ( "/dashboard" )
21+ }
22+
1623 if ( ! isLoading ) {
1724 setIsReady ( true ) ;
1825 }
19- } , [ isLoading ] )
26+ } , [ isLoading , router ] )
2027
2128 if ( ! isReady ) {
2229 return (
2330 < div className = "min-h-full flex flex-col" >
24- < div className = "flex flex-col items-center justify-center md:justify-start text-center gap-y-8 flex-1 px-6 pb-10 m-0 p-0" >
31+ < div className = "flex flex-col items-center justify-center md:justify-start text-center gap-y-8 flex-1 pb-10 m-0 p-0 " >
2532
26- < div className = "flex flex-row gap-10" >
27- < div className = "flex justify-start flex-col gap-2" >
28- < Skeleton className = "h-40 sm:h-56 md:h-72 w-full max-w-[500px] " />
29- < Skeleton className = "h-6 sm:h-7 md:h-8 w-48 sm:w-80 md: w-[600px]" />
33+ < div className = "w-full max-w-6xl mx-auto px-4 sm:px-6 flex flex-col lg:flex- row items-center lg:items-start gap-6 lg: gap-10" >
34+ < div className = "w-full max-w-2xl flex justify-start flex-col gap-2" >
35+ < Skeleton className = "h-40 sm:h-56 md:h-72 w-full" />
36+ < Skeleton className = "h-6 sm:h-7 md:h-8 w-full max- w-[600px] mt-4 " />
3037 < Skeleton className = "h-8 sm:h-10 md:h-12 w-24 sm:w-28 md:w-36" />
3138 </ div >
3239
33- < Skeleton className = "h-96 w-96" />
40+ < Skeleton className = "h-64 w-full max-w-[340px] sm:h-80 sm:max-w-[420px] lg:h-96 lg:w-96" />
41+ </ div >
42+
43+ < div className = "w-full max-w-[1050px] mx-auto px-4 sm:px-6" >
44+ < div className = "space-y-3" >
45+ { Array . from ( { length : 4 } ) . map ( ( _ , i ) => (
46+ < div key = { i } className = "rounded-2xl border border-border/50 p-5 sm:p-6 py-6" >
47+ < div className = "flex flex-col items-center text-center md:flex-row md:items-center md:text-left gap-4 sm:gap-5" >
48+ < Skeleton className = "h-20 w-20 rounded-xl" />
49+ < div className = "space-y-2 w-full md:flex-1 flex flex-col items-center md:items-start text-center md:text-left" >
50+ < Skeleton className = "h-7 w-full max-w-56" />
51+ < Skeleton className = "h-4 w-full max-w-[640px]" />
52+ </ div >
53+ </ div >
54+ </ div >
55+ ) ) }
56+ </ div >
3457 </ div >
58+
59+ < div className = "w-full max-w-6xl mx-auto p-6 flex justify-center items-center flex-col" >
60+ < div className = "w-full" >
61+ < div className = "flex flex-col items-center text-center" >
62+ < div className = "flex items-end gap-2 sm:gap-3 mb-3" >
63+ < Skeleton className = "h-10 sm:h-12 w-36 sm:w-48" />
64+ < Skeleton className = "h-10 sm:h-12 w-20 sm:w-28" />
65+ </ div >
66+ < Skeleton className = "h-4 w-full max-w-2xl mb-6" />
67+
68+ < div className = "flex items-center gap-3 sm:gap-4 mb-8" >
69+ < Skeleton className = "h-9 w-24 sm:w-32 rounded-md" />
70+ < Skeleton className = "h-6 w-4" />
71+ < Skeleton className = "h-9 w-24 sm:w-32 rounded-md" />
72+ </ div >
73+ </ div >
3574
36- < div className = "w-full flex flex-col items-center justify-center gap-y-10" >
37- < Skeleton className = "h-[400px] md:h-[250px] w-full max-w-[1000px]" />
38- < Skeleton className = "h-[400px] md:h-[250px] w-full max-w-[1000px]" />
39- < Skeleton className = "h-[400px] md:h-[250px] w-full max-w-[1000px]" />
40- < Skeleton className = "h-[400px] md:h-[250px] w-full max-w-[1000px]" />
75+ < div className = "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 sm:gap-6 text-left mb-8" >
76+ { Array . from ( { length : 3 } ) . map ( ( _ , i ) => (
77+ < div key = { i } className = "rounded-2xl border border-border/50 p-5 sm:p-6 min-h-[330px] flex flex-col" >
78+ < div className = "flex items-center gap-3 mb-5" >
79+ < Skeleton className = "h-8 w-8 rounded-lg" />
80+ < div className = "space-y-2 flex-1" >
81+ < Skeleton className = "h-7 w-28" />
82+ < Skeleton className = "h-4 w-20" />
83+ </ div >
84+ </ div >
85+
86+ < div className = "space-y-3 flex-1" >
87+ < Skeleton className = "h-3.5 w-full" />
88+ < Skeleton className = "h-3.5 w-[92%]" />
89+ < Skeleton className = "h-3.5 w-[84%]" />
90+ < Skeleton className = "h-3.5 w-[74%]" />
91+ </ div >
92+
93+ < Skeleton className = "h-9 w-full rounded-md mt-6" />
94+ </ div >
95+ ) ) }
96+ </ div >
97+
98+ < div className = "rounded-xl border border-border/50 overflow-hidden" >
99+ < div className = "grid grid-cols-4 gap-3 sm:gap-4 p-4 sm:p-5 border-b border-border/50" >
100+ < Skeleton className = "h-5 w-full max-w-44" />
101+ < Skeleton className = "h-5 w-full max-w-16" />
102+ < Skeleton className = "h-5 w-full max-w-16" />
103+ < Skeleton className = "h-5 w-full max-w-20" />
104+ </ div >
105+
106+ { Array . from ( { length : 6 } ) . map ( ( _ , r ) => (
107+ < div key = { r } className = "grid grid-cols-4 gap-3 sm:gap-4 p-4 sm:p-5 border-b border-border/40 last:border-b-0" >
108+ < Skeleton className = "h-4 w-full max-w-52" />
109+ < Skeleton className = "h-4 w-full max-w-12" />
110+ < Skeleton className = "h-4 w-full max-w-16" />
111+ < Skeleton className = "h-4 w-full max-w-16" />
112+ </ div >
113+ ) ) }
114+ </ div >
115+ </ div >
41116 </ div >
117+
42118 </ div >
43119 < Footer />
44120 </ div >
0 commit comments