Skip to content

Commit 8002bb8

Browse files
committed
feat: update layout components to use flex-1 for better responsiveness
1 parent cc14158 commit 8002bb8

7 files changed

Lines changed: 21 additions & 12 deletions

File tree

apps/studio/src/components/user-menu.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ export function UserMenu() {
5050
}
5151

5252
const handleLogout = async () => {
53-
await logout();
54-
navigate({ to: '/login' });
53+
try {
54+
await logout();
55+
} finally {
56+
navigate({ to: '/login' });
57+
}
5558
};
5659

5760
return (

apps/studio/src/routes/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function LoginPage() {
4949
};
5050

5151
return (
52-
<div className="flex min-h-screen items-center justify-center bg-background px-4">
52+
<div className="flex flex-1 items-center justify-center bg-background px-4">
5353
<Card className="w-full max-w-sm">
5454
<CardHeader>
5555
<CardTitle>Sign in</CardTitle>

apps/studio/src/routes/orgs.$orgId.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function OrgDetailPage() {
6161
const isActive = session?.activeOrganizationId === orgId;
6262

6363
return (
64-
<div className="flex min-h-screen flex-col">
64+
<div className="flex flex-1 flex-col">
6565
<SiteHeader selectedView="overview" />
6666
<div className="flex-1 px-6 py-8">
6767
<div className="mx-auto max-w-3xl space-y-6">

apps/studio/src/routes/orgs..tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
import { createFileRoute } from '@tanstack/react-router'
1+
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import { createFileRoute, Outlet } from '@tanstack/react-router';
24

35
export const Route = createFileRoute('/orgs/')({
4-
component: RouteComponent,
5-
})
6+
component: OrgsLayout,
7+
});
68

7-
function RouteComponent() {
8-
return <div>Hello "/orgs/"!</div>
9+
function OrgsLayout() {
10+
return (
11+
<div className="flex flex-1 flex-col overflow-auto">
12+
<Outlet />
13+
</div>
14+
);
915
}

apps/studio/src/routes/orgs.index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function OrgsListPage() {
3333
};
3434

3535
return (
36-
<div className="flex min-h-screen flex-col">
36+
<div className="flex flex-1 flex-col">
3737
<SiteHeader selectedView="overview" />
3838
<div className="flex-1 px-6 py-8">
3939
<div className="mx-auto max-w-3xl space-y-6">

apps/studio/src/routes/orgs.new.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function NewOrgPage() {
5858
};
5959

6060
return (
61-
<div className="flex min-h-screen flex-col">
61+
<div className="flex flex-1 flex-col">
6262
<SiteHeader selectedView="overview" />
6363
<div className="flex-1 px-6 py-8">
6464
<div className="mx-auto max-w-lg">

apps/studio/src/routes/register.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function RegisterPage() {
5050
};
5151

5252
return (
53-
<div className="flex min-h-screen items-center justify-center bg-background px-4">
53+
<div className="flex flex-1 items-center justify-center bg-background px-4">
5454
<Card className="w-full max-w-sm">
5555
<CardHeader>
5656
<CardTitle>Create account</CardTitle>

0 commit comments

Comments
 (0)