Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 45 additions & 65 deletions apps/saru/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const crimson = Crimson_Text({

export default function Home() {
const router = useRouter();
const [hasSession, setHasSession] = useState<boolean>(false);

const { data: session } = authClient.useSession();
const hasSession = !!session?.user;

const [starGoal, setStarGoal] = useState(0);
const { count: animatedStarCount } = useCounter(starGoal);
Expand All @@ -36,26 +38,6 @@ export default function Home() {
.catch(() => {});
}, []);

useEffect(() => {
const checkSession = async () => {
try {
const { data: session, error } = await authClient.getSession();
if (error) {
console.error("Error fetching session:", error);
return;
}

const isLoggedIn = !!session?.user;
setHasSession(isLoggedIn);

} catch (error) {
console.error("Error checking session unexpectedly:", error);
}
};

checkSession();
}, [router]);

const handleBeginClick = () => {
if (hasSession) {
router.push("/documents");
Expand Down Expand Up @@ -143,9 +125,8 @@ export default function Home() {

{/* Social Proof */}
<div className="flex flex-col items-center mt-6">
<div className="flex flex-col items-center gap-4 md:gap-5">
<div className="text-md tracking-tight text-muted-foreground text-center">Used by</div>
<div className="max-w-4xl mx-auto w-full">
<div className="flex flex-wrap items-center justify-center gap-4 md:gap-5">
<span className="text-xs tracking-tight text-muted-foreground">Used by</span>
<div className="flex items-center justify-center gap-5 md:gap-6 opacity-80">
<Image
src="/images/figma-logo.svg"
Expand All @@ -157,9 +138,9 @@ export default function Home() {
<Image
src="/images/vercel-logo.svg"
alt="Vercel logo"
width={64}
height={16}
className="h-5 w-auto invert dark:invert-0"
width={56}
height={14}
className="h-4 w-auto invert dark:invert-0"
/>
<Image
src="/images/granola-logo.svg"
Expand All @@ -169,45 +150,44 @@ export default function Home() {
className="h-5 w-auto invert dark:invert-0"
/>
</div>
</div>

<div className="flex flex-wrap items-center justify-center gap-2.5 md:gap-3 text-xs">
<Link
href="https://x.com/leerob"
target="_blank"
rel="noopener noreferrer"
className="group flex items-center gap-1.5 rounded-full border border-border bg-background px-3 md:px-4 h-8 md:h-10 w-36 md:w-48 justify-start text-xs whitespace-nowrap hover:bg-accent hover:text-accent-foreground transition-colors"
>
<Image
src="/images/leerob.jpg"
alt="Lee Robinson"
width={24}
height={24}
className="size-6 rounded-full object-cover shrink-0"
/>
<span className="font-medium">@leerob</span>
<span className="hidden md:inline text-muted-foreground/60">VP DX, Cursor</span>
</Link>

<Link
href="https://x.com/dps"
target="_blank"
rel="noopener noreferrer"
className="group flex items-center gap-1.5 rounded-full border border-border bg-background px-3 md:px-4 h-8 md:h-10 w-36 md:w-48 justify-start text-xs whitespace-nowrap hover:bg-accent hover:text-accent-foreground transition-colors"
>
<Image
src="/images/dps.jpg"
alt="David Singleton"
width={24}
height={24}
className="size-6 rounded-full object-cover shrink-0"
/>
<span className="font-medium">@dps</span>
<span className="hidden md:inline text-muted-foreground/60">ex-CTO, Stripe</span>
</Link>
</div>
<span className="h-6 md:h-8 w-px bg-border" />
<div className="flex flex-wrap items-center justify-center gap-2.5 md:gap-3 text-xs">
<Link
href="https://x.com/leerob"
target="_blank"
rel="noopener noreferrer"
className="group flex items-center gap-1.5 rounded-full border border-border bg-background pl-2 md:pl-3 pr-3 md:pr-4 h-8 md:h-10 w-36 md:w-48 justify-center text-xs whitespace-nowrap hover:bg-accent hover:text-accent-foreground transition-colors"
>
<Image
src="/images/leerob.jpg"
alt="Lee Robinson"
width={24}
height={24}
className="size-6 rounded-full object-cover shrink-0"
/>
<span className="font-medium">@leerob</span>
<span className="hidden md:inline text-muted-foreground/60">VP DX, Cursor</span>
</Link>

<Link
href="https://x.com/dps"
target="_blank"
rel="noopener noreferrer"
className="group flex items-center gap-1.5 rounded-full border border-border bg-background pl-2 md:pl-3 pr-3 md:pr-4 h-8 md:h-10 w-36 md:w-48 justify-center text-xs whitespace-nowrap hover:bg-accent hover:text-accent-foreground transition-colors"
>
<Image
src="/images/dps.jpg"
alt="David Singleton"
width={24}
height={24}
className="size-6 rounded-full object-cover shrink-0"
/>
<span className="font-medium">@dps</span>
<span className="hidden md:inline text-muted-foreground/60">ex-CTO, Stripe</span>
</Link>
</div>
</div>
</div>

<div className="mt-12 flex justify-center w-full">
<div className="hero-frame">
Expand Down Expand Up @@ -251,7 +231,7 @@ export default function Home() {
height={48}
className="size-12 rounded-full object-cover"
/>
<blockquote className="text-lg md:text-xl italic text-muted-foreground max-w-prose leading-relaxed">
<blockquote className="text-lg md:text-xl italic text-muted-foreground max-w-prose leading-relaxed text-balance">
“I went in expecting slop, but it&apos;s actually good. The app looked so good, and it looks legitimately useful.”
</blockquote>
<figcaption className="text-sm text-foreground font-medium flex flex-col items-center">
Expand Down