Skip to content

Commit 8024554

Browse files
update header button to link to Clerk sign-up and hide when user is logged in
1 parent bc503d2 commit 8024554

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

app/components/header/Header.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { useStore } from '@nanostores/react';
2+
import { useUser } from '@clerk/remix';
23
import { chatStore } from '~/lib/stores/chat';
34
import { classNames } from '~/utils/classNames';
45

56
export function Header() {
67
const chat = useStore(chatStore);
8+
const { isSignedIn } = useUser();
79

810
// Only show when chat has NOT started
911
if (chat.started) {
@@ -13,7 +15,7 @@ export function Header() {
1315
return (
1416
<header
1517
className={classNames(
16-
'flex items-center p-3 h-12 flex-1 bg-codinit-elements-background-depth-1 border-b border-transparent',
18+
'flex items-center justify-between p-3 h-12 flex-1 bg-codinit-elements-background-depth-1 border-b border-transparent',
1719
)}
1820
>
1921
<div className="flex items-center gap-2 z-logo text-codinit-elements-textPrimary cursor-pointer">
@@ -23,6 +25,17 @@ export function Header() {
2325
<img src="/logo-light.png" alt="logo" className="w-[90px] inline-block hidden dark:block" />
2426
</a>
2527
</div>
28+
29+
{!isSignedIn && (
30+
<a
31+
href="https://smooth-crab-83.accounts.dev/sign-up"
32+
target="_blank"
33+
rel="noopener noreferrer"
34+
className="px-4 py-1.5 rounded-lg font-medium text-sm bg-blue-600 hover:bg-blue-700 text-white transition-colors"
35+
>
36+
Join Waitlist
37+
</a>
38+
)}
2639
</header>
2740
);
2841
}

app/root.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,9 @@ function App() {
147147
}
148148

149149
export default ClerkApp(App, {
150-
publishableKey: process.env.VITE_CLERK_PUBLISHABLE_KEY || '',
150+
publishableKey: process.env.CLERK_PUBLISHABLE_KEY || 'pk_live_Y2xlcmsuY29kaW5pdC5kZXYk',
151151
domain: 'clerk.codinit.dev',
152152
isSatellite: false,
153-
signInUrl: 'https://accounts.codinit.dev/sign-in',
154-
signUpUrl: 'https://accounts.codinit.dev/sign-up',
155-
waitlistUrl: '/waitlist',
153+
signInUrl: 'https://smooth-crab-83.accounts.dev/sign-in',
154+
signUpUrl: 'https://smooth-crab-83.accounts.dev/sign-up',
156155
});

0 commit comments

Comments
 (0)