Skip to content

Commit

Permalink
Update CTA for dashboard and sign in
Browse files Browse the repository at this point in the history
  • Loading branch information
scottquested committed Jan 24, 2024
1 parent f033353 commit 6716799
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
20 changes: 18 additions & 2 deletions src/app/header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"use client";

import ThemeToggle from "@/components/ThemeToggle";
import { buttonVariants } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import {
SignedIn,
UserButton,
Expand All @@ -24,12 +26,26 @@ export default function Header() {
<div className="flex items-center gap-3">
<SignedIn>
{!path.includes("dashboard") && (
<Link href="/dashboard">Go to Dashboard</Link>
<Link
href="/dashboard"
className={cn(buttonVariants({ variant: "default", size: "sm" }))}
>
Dashboard
</Link>
)}
<UserButton afterSignOutUrl="\" />
</SignedIn>
<SignedOut>
<SignInButton mode="modal" />
<SignInButton mode="modal">
<span
className={cn(
buttonVariants({ variant: "default", size: "sm" }),
"cursor-pointer"
)}
>
Sign in
</span>
</SignInButton>
</SignedOut>
<nav className="flex items-center space-x-1">
<ThemeToggle />
Expand Down
6 changes: 3 additions & 3 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { useConvexAuth } from "convex/react";
import Header from "./header";

export default function Home() {
const { isAuthenticated } = useConvexAuth();

return (
<>
<Header />
<main className="h-svh pt-24">Home page!</main>
<main className="h-svh flex items-center justify-center">
<h1 className="text-8xl">Home page!</h1>
</main>
</>
);
}
3 changes: 1 addition & 2 deletions src/components/DashboardNav/DashboardNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export default function DashboardNav({
className={cn(
buttonVariants({ variant: link.variant, size: "icon" }),
"h-9 w-9",
link.variant === "default" &&
"dark:bg-muted dark:text-muted-foreground dark:hover:bg-muted dark:hover:text-white"
link.variant === "default"
)}
onClick={() => setActiveTab(index)}
>
Expand Down

0 comments on commit 6716799

Please sign in to comment.