-
-
Notifications
You must be signed in to change notification settings - Fork 375
Expand file tree
/
Copy pathFooter.tsx
More file actions
85 lines (79 loc) · 1.94 KB
/
Copy pathFooter.tsx
File metadata and controls
85 lines (79 loc) · 1.94 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import * as React from 'react'
import { ConsentDialogLink } from '@c15t/react'
import { Link } from '@tanstack/react-router'
import { Card } from './Card'
const footerLinks = [
{ label: 'Blog', to: '/blog' },
{ label: '@Tan_Stack on X.com', to: 'https://x.com/tan_stack' },
{
label: '@TannerLinsley on X.com',
to: 'https://x.com/tannerlinsley',
},
{ label: 'GitHub', to: 'https://github.com/tanstack' },
{
label: 'YouTube',
to: 'https://youtube.com/@tan_stack',
},
{
label: 'Nozzle.io - Keyword Rank Tracker',
to: 'https://nozzle.io',
},
{
label: 'Ethos',
to: '/ethos',
},
{
label: 'Tenets',
to: '/tenets',
},
{
label: 'Privacy Policy',
to: '/privacy',
},
{
label: 'Terms of Service',
to: '/terms',
},
]
export function Footer() {
return (
<Card
className={`relative flex flex-col items-start justify-center gap-4 p-8
max-w-(--breakpoint-lg) mx-auto text-sm`}
>
<div className={`grid gap-1 sm:grid-cols-2 md:grid-cols-3`}>
{footerLinks.map((item) => (
<div key={item.to}>
{item.to.startsWith('http') ? (
<a href={item.to} target="_blank" rel="noreferrer">
{item.label}
</a>
) : (
<Link to={item.to}>{item.label}</Link>
)}
</div>
))}
<FooterConsentSettingsLink />
</div>
<div className={`text-center opacity-60`}>
© {new Date().getFullYear()} TanStack LLC
</div>
</Card>
)
}
function FooterConsentSettingsLink() {
const [hasMounted, setHasMounted] = React.useState(false)
React.useEffect(() => {
setHasMounted(true)
}, [])
if (!hasMounted) {
return null
}
return (
<div>
<ConsentDialogLink className="appearance-none border-0 bg-transparent p-0 text-left text-current [font:inherit]">
Privacy Settings
</ConsentDialogLink>
</div>
)
}