mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-09 14:25:25 -05:00
Navbar sometimes disappears outside `/onboarding`. ### Changes 🏗️ This PR solves the problem of disappearing Navbar outside `/onboarding` by introducing `app/(platform)` route group. - Move all routes requiring Navbar to `app/(platform)` - Move `<Navbar>` to `app/(platform)/layout.tsx` - Move `/onboarding` to `app/(no-navbar/` - Remove pathname injection to header from middleware and stop relying on it to hide the navbar ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Common routes work properly
20 lines
611 B
TypeScript
20 lines
611 B
TypeScript
import { updateSession } from "@/lib/supabase/middleware";
|
|
import { type NextRequest } from "next/server";
|
|
|
|
export async function middleware(request: NextRequest) {
|
|
return await updateSession(request);
|
|
}
|
|
|
|
export const config = {
|
|
matcher: [
|
|
/*
|
|
* Match all request paths except for the ones starting with:
|
|
* - _next/static (static files)
|
|
* - _next/image (image optimization files)
|
|
* - favicon.ico (favicon file)
|
|
* Feel free to modify this pattern to include more paths.
|
|
*/
|
|
"/((?!_next/static|_next/image|favicon.ico|auth|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)",
|
|
],
|
|
};
|