-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathinitial-header.tsx
More file actions
63 lines (59 loc) · 1.6 KB
/
initial-header.tsx
File metadata and controls
63 lines (59 loc) · 1.6 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
"use client"
import { Logo } from "@ui/assets/Logo"
import { Button } from "@ui/components/button"
import { useRouter } from "next/navigation"
import { useOrgOnboarding } from "@hooks/use-org-onboarding"
import { analytics } from "@/lib/analytics"
export function InitialHeader({
showUserSupermemory,
showSkipOnboarding,
name,
}: {
showUserSupermemory?: boolean
showSkipOnboarding?: boolean
name?: string
}) {
const router = useRouter()
const { markOrgOnboarded, isLoading } = useOrgOnboarding()
const userName = name ? `${name.split(" ")[0]}'s` : "My"
const handleSkip = () => {
markOrgOnboarded()
analytics.onboardingCompleted()
router.push("/")
}
return (
<div className="flex p-6 justify-between items-center">
<div className="flex items-center z-10!">
<Logo className="h-7" />
{showUserSupermemory && (
<div className="flex flex-col items-start justify-center ml-2">
<p className="text-[#8B8B8B] text-[11px] leading-tight">
{userName}
</p>
<p className="text-white font-bold text-xl leading-none -mt-1">
supermemory
</p>
</div>
)}
</div>
<div className="flex items-center gap-3 z-10!">
{showSkipOnboarding && !isLoading && (
<button
type="button"
onClick={handleSkip}
className="text-sm text-white/40 hover:text-white/70 transition-colors cursor-pointer"
>
Skip Onboarding
</button>
)}
<Button
variant="newDefault"
className="rounded-2xl text-base gap-1 h-11!"
size="lg"
>
Memory API <span className="text-xs mt-[4px]">↗</span>
</Button>
</div>
</div>
)
}