Skip to content

Commit 8068c0b

Browse files
committed
Update header.tsx
1 parent 568e5fc commit 8068c0b

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

apps/marketing/src/app/header.tsx

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const navigation = [
2121
{ name: "Playground", href: "/playground" },
2222
];
2323

24-
2524
export default function Header() {
2625
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
2726

@@ -31,10 +30,11 @@ export default function Header() {
3130
queryKey: ["user"],
3231
retry: false,
3332
// eslint-disable-next-line turbo/no-undeclared-env-vars
34-
queryFn: () => fetch(process.env.NEXT_PUBLIC_ORY_URL + "/sessions/whoami", {
35-
credentials: "include",
36-
}).then((res) => (res.ok) ? res.json() : Promise.reject(res)),
37-
})
33+
queryFn: () =>
34+
fetch(process.env.NEXT_PUBLIC_ORY_URL + "/sessions/whoami", {
35+
credentials: "include",
36+
}).then((res) => (res.ok ? res.json() : Promise.reject(res))),
37+
});
3838

3939
return (
4040
<header className="bg-surface/90 backdrop-blur-sm fixed z-30 w-full border-b border-b-outline-variant">
@@ -47,7 +47,7 @@ export default function Header() {
4747
href="/home"
4848
className={cx(
4949
"-m-1.5 p-1.5",
50-
pathname.startsWith("/home") && "!text-tertiary"
50+
pathname.startsWith("/home") && "!text-tertiary",
5151
)}
5252
>
5353
<span className="sr-only">Pixeleye</span>
@@ -61,17 +61,15 @@ export default function Header() {
6161
className={cx(
6262
"text-sm font-semibold leading-6 text-on-surface hover:text-tertiary transition-colors",
6363
pathname.startsWith(item.selector || item.href) &&
64-
"!text-tertiary"
64+
"!text-tertiary",
6565
)}
6666
>
6767
{item.name}
6868
</NextLink>
6969
))}
70-
7170
</div>
7271
</div>
7372
<div className="flex items-center space-x-4">
74-
7573
<NextLink
7674
href="https://github.com/pixeleye-io/pixeleye"
7775
className="text-sm hidden lg:block font-semibold leading-6 text-tertiary"
@@ -82,7 +80,10 @@ export default function Header() {
8280
<DocSearch />
8381

8482
<Button variant="outline" asChild>
85-
<NextLink className="hidden lg:block w-28" href={isSuccess ? "/dashboard" : "/registration"}>
83+
<NextLink
84+
className="hidden lg:block w-28"
85+
href={isSuccess ? "/dashboard" : "/registration"}
86+
>
8687
{isPending ? "" : isSuccess ? "Dashboard" : "Get started"}
8788
</NextLink>
8889
</Button>
@@ -108,7 +109,7 @@ export default function Header() {
108109
href="/home"
109110
className={cx(
110111
"-mx-1.5 -mt-1 p-1.5",
111-
pathname.startsWith("/home") && "!text-tertiary"
112+
pathname.startsWith("/home") && "!text-tertiary",
112113
)}
113114
>
114115
<span className="sr-only">Pixeleye</span>
@@ -134,7 +135,7 @@ export default function Header() {
134135
className={cx(
135136
"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-on-surface-container hover:bg-surface-container-high",
136137
pathname.startsWith(item.selector || item.href) &&
137-
"!text-tertiary"
138+
"!text-tertiary",
138139
)}
139140
>
140141
{item.name}
@@ -148,15 +149,15 @@ export default function Header() {
148149
>
149150
Star us on Github
150151
</NextLink>
151-
{
152-
!isPending && (
153-
<NextLink
154-
href={isSuccess ? "/dashboard" : "/registration"}
155-
className="-mx-3 w-28 block rounded-lg px-3 py-2.5 text-base font-semibold leading-7 text-on-surface-container hover:bg-surface-container-high"
156-
>
157-
{isSuccess ? "Dashboard" : "Get started"}
158-
</NextLink>
159-
)}
152+
{!isPending && (
153+
<NextLink
154+
// href={isSuccess ? "/dashboard" : "/registration"}
155+
href={"/getting-started"}
156+
className="-mx-3 w-28 block rounded-lg px-3 py-2.5 text-base font-semibold leading-7 text-on-surface-container hover:bg-surface-container-high"
157+
>
158+
{isSuccess ? "Dashboard" : "Get started"}
159+
</NextLink>
160+
)}
160161
</div>
161162
</div>
162163
</div>

0 commit comments

Comments
 (0)