Skip to content

Commit d90e1d1

Browse files
committed
doc: Add link tree for React Paris
1 parent 407141e commit d90e1d1

File tree

2 files changed

+166
-0
lines changed

2 files changed

+166
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { Button } from '@/src/components/ui/button'
2+
import Link from 'next/link'
3+
import { ReactNode } from 'react'
4+
5+
export type LinkTreeItemProps = {
6+
href: string
7+
icon: ReactNode
8+
label: ReactNode
9+
}
10+
11+
export function LinkTreeItem({ href, icon, label }: LinkTreeItemProps) {
12+
const isLocalRoute = href.startsWith('/')
13+
return (
14+
<li>
15+
<Button
16+
asChild
17+
variant="outline"
18+
className="flex w-full items-center justify-center gap-3 py-6 text-lg transition-all hover:scale-[1.01]"
19+
>
20+
<Link
21+
href={href}
22+
target={isLocalRoute ? undefined : '_blank'}
23+
rel={isLocalRoute ? undefined : 'noopener noreferrer'}
24+
>
25+
{icon}
26+
<span>{label}</span>
27+
</Link>
28+
</Button>
29+
</li>
30+
)
31+
}
32+
33+
type LinkTreeProps = {
34+
items: LinkTreeItemProps[]
35+
}
36+
37+
export function LinkTree({ items }: LinkTreeProps) {
38+
return (
39+
<ul className="space-y-4">
40+
{items.map((item, index) => (
41+
<LinkTreeItem key={index} {...item} />
42+
))}
43+
</ul>
44+
)
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
import { ReactParisLogo } from '@/src/components/react-paris'
2+
import { SiBluesky, SiDiscord } from '@icons-pack/react-simple-icons'
3+
import {
4+
Github,
5+
Images,
6+
Library,
7+
Linkedin,
8+
Mail,
9+
Twitter,
10+
Youtube
11+
} from 'lucide-react'
12+
import { Logo } from '../blog/[slug]/_components/47ng'
13+
import { LinkTree, LinkTreeItemProps } from './link-tree'
14+
15+
const links: LinkTreeItemProps[] = [
16+
{
17+
href: '#todo-add-feedback-link',
18+
icon: <SiDiscord className="size-5" />,
19+
label: <>Questions & Feedback 🙏</>
20+
},
21+
{
22+
href: '/',
23+
icon: <Library className="size-5" />,
24+
label: 'Documentation'
25+
},
26+
{
27+
href: 'https://github.com/47ng/nuqs',
28+
icon: <Github className="size-5" />,
29+
label: (
30+
<>
31+
GitHub{' '}
32+
<span className="text-sm text-muted-foreground">
33+
(give nuqs a star! ⭐)
34+
</span>
35+
</>
36+
)
37+
},
38+
{
39+
href: 'https://github.com/franky47/react-paris-25-demo',
40+
icon: <Github className="size-5" />,
41+
label: 'Demo app'
42+
},
43+
{
44+
href: 'https://nuqs.47ng.com/react-paris-25-slides.pdf',
45+
icon: <Images className="size-5" />,
46+
label: 'Slides'
47+
},
48+
{
49+
href: 'https://bsky.app/profile/francoisbest.com',
50+
icon: <SiBluesky className="size-5" />,
51+
label: (
52+
<>
53+
Bluesky{' '}
54+
<span className="text-sm text-muted-foreground">@francoisbest.com</span>
55+
</>
56+
)
57+
},
58+
{
59+
href: 'https://bsky.app/profile/nuqs.47ng.com',
60+
icon: <SiBluesky className="size-5" />,
61+
label: (
62+
<>
63+
Bluesky{' '}
64+
<span className="text-sm text-muted-foreground">@nuqs.47ng.com</span>
65+
</>
66+
)
67+
},
68+
{
69+
href: 'https://www.youtube.com/@47ng-dev',
70+
icon: <Youtube className="size-5" />,
71+
label: 'YouTube'
72+
},
73+
{
74+
href: 'https://www.linkedin.com/in/francoisbest/',
75+
icon: <Linkedin className="size-5" />,
76+
label: <>LinkedIn</>
77+
},
78+
{
79+
href: 'mailto:nuqs@47ng.com',
80+
icon: <Mail className="size-5" />,
81+
label: 'Contact me'
82+
},
83+
{
84+
href: 'https://x.com/nuqs47ng',
85+
icon: <Twitter className="size-5" />,
86+
label: (
87+
<>
88+
Twitter <span className="text-sm text-muted-foreground">@nuqs47ng</span>
89+
</>
90+
)
91+
},
92+
{
93+
href: 'https://x.com/fortysevenfx',
94+
icon: <Twitter className="size-5" />,
95+
label: (
96+
<>
97+
<span className="line-through">Twitter</span>{' '}
98+
<span className="text-sm text-muted-foreground">
99+
@fortysevenfx (archived)
100+
</span>
101+
</>
102+
)
103+
}
104+
]
105+
106+
export default function Page() {
107+
return (
108+
<section className="container max-w-lg py-12">
109+
<div className="flex items-center justify-center gap-12">
110+
<Logo className="size-16" />
111+
<ReactParisLogo className="-mx-4 mb-4 size-24 translate-y-1.5" />
112+
</div>
113+
<p className="mb-2 text-center">Thanks for attending my talk! 🫶</p>
114+
<p className="mb-8 text-balance text-center">
115+
Here are some useful links to learn more about nuqs, and how to find me
116+
on social media:
117+
</p>
118+
<LinkTree items={links} />
119+
</section>
120+
)
121+
}

0 commit comments

Comments
 (0)