Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat: redirect logged-in users from auth pages and add dashboard CTA on homepage

Gener507c7883ea64
diff --git a/src/web/src/app/(auth)/layout.tsx b/src/web/src/app/(auth)/layout.tsx
new file mode 100644
index 000000000..199e0b57d
--- /dev/null
+++ b/src/web/src/app/(auth)/layout.tsx
@@ -0,0 +1,13 @@
+import { redirect } from "next/navigation";
+import { getSession } from "@/lib/session";
+
+export default async function AuthLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const session = await getSession();
+ if (session) redirect("/workspaces?auto");
+
+ return <>{children}</>;
+}
diff --git a/src/web/src/components/home/hero-section.tsx b/src/web/src/components/home/hero-section.tsx
index e449d5bba..1472f70cb 100644
--- a/src/web/src/components/home/hero-section.tsx
+++ b/src/web/src/components/home/hero-section.tsx
@@ -10,7 +10,7 @@ import { TypewriterVisual } from "@/components/typewriter-visual";
gsap.registerPlugin(ScrollTrigger, SplitText);
-export function HeroSection() {
+export function HeroSection({ isLoggedIn }: { isLoggedIn: boolean }) {
const sectionRef = useRef<HTMLDivElement>(null);
const headingRef = useRef<HTMLHeadingElement>(null);
const sublineRef = useRef<HTMLParagraphElement>(null);
@@ -197,7 +197,7 @@ export function HeroSection() {
</div>
{/* CTA */}
- <div ref={ctaRef} className="mt-8">
+ <div ref={ctaRef} className="mt-8 flex flex-wrap items-center justify-center gap-3">
<a
href="https://github.com/alookai/alook"
className="inline-flex items-center gap-2 px-6 py-2.5 text-sm transition-all duration-200 hover:opacity-80"
@@ -213,6 +213,25 @@ export function HeroSection() {
</svg>
VIEW SOURCE ON GITHUB
</a>
+ {isLoggedIn && (
+ <a
+ href="/workspaces?auto"
+ className="inline-flex items-center gap-2 px-6 py-2.5 text-sm transition-all duration-200 hover:opacity-80"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text)",
+ border: "1px solid var(--landing-text)",
+ letterSpacing: "0.05em",
+ }}
+ >
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
+ <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />
+ <polyline points="10 17 15 12 10 7" />
+ <line x1="15" y1="12" x2="3" y2="12" />
+ </svg>
+ DASHBOARD
+ </a>
+ )}
</div>
</div>
</section>
diff --git a/src/web/src/components/home/home-page.tsx b/src/web/src/components/home/home-page.tsx
index 61aa6c977..7af484930 100644
--- a/src/web/src/components/home/home-page.tsx
+++ b/src/web/src/components/home/home-page.tsx
@@ -57,7 +57,7 @@ export function HomePage({ isLoggedIn }: { isLoggedIn: boolean }) {
style={{ backgroundColor: "var(--landing-bg)" }}
>
<MarketingNav isLoggedIn={isLoggedIn} />
- <HeroSection />
+ <HeroSection isLoggedIn={isLoggedIn} />
<FeatureShowcase />
<ArchitectureOverview />
<MarketingFooter />