-
-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathpage.tsx
More file actions
69 lines (60 loc) · 2.32 KB
/
page.tsx
File metadata and controls
69 lines (60 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import Image from "next/image";
import Link from "next/link";
import { Suspense } from "react";
import { ProfileSkeleton } from "@/components/skeletons/profile-skeleton";
import { ProjectListSkeleton } from "@/components/skeletons/project-skeleton";
import { TimelineSkeleton } from "@/components/skeletons/timeline-skeleton";
import { AboutSkeleton } from "@/components/skeletons/about-skeleton";
import { MediumBlogsSkeleton } from "@/components/skeletons/medium-blogs-skeleton";
import { ProfileSection } from "@/components/ProfileSection";
import { AboutSection } from "@/components/AboutSection";
import { LinkedInSection } from "@/components/LinkedInSection";
import { ProjectsSection } from "@/components/ProjectsSection";
import { MediumBlogsSection } from "@/components/MediumBlogsSection";
export const maxDuration = 60;
export default async function Page({
params,
searchParams,
}: {
params: Promise<{ username: string }>;
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}) {
const { username } = await params;
const urlSearchParams = await searchParams;
if (!username) return null;
return (
<div className="container mx-auto px-4 py-8 flex flex-col lg:flex-row gap-8 fade-in">
<div
id="left-section"
className="w-full lg:w-[420px] lg:sticky lg:top-8 lg:self-start space-y-2 flex flex-col items-center lg:items-start"
>
<Link href="/" className="block">
<Image
src="/images/logo-full.png"
alt="devb.io"
width={140}
height={50}
className="h-10 w-auto"
/>
</Link>
<Suspense fallback={<ProfileSkeleton />}>
<ProfileSection username={username} searchParams={urlSearchParams} />
</Suspense>
</div>
<div className="flex-1 space-y-8">
<Suspense fallback={<AboutSkeleton />}>
<AboutSection username={username} />
</Suspense>
<Suspense fallback={<TimelineSkeleton />}>
<LinkedInSection username={username} />
</Suspense>
<Suspense fallback={<ProjectListSkeleton />}>
<ProjectsSection username={username} />
</Suspense>
<Suspense fallback={<MediumBlogsSkeleton />}>
<MediumBlogsSection username={username} />
</Suspense>
</div>
</div>
);
}