Skip to content

Commit 1f9eff0

Browse files
committed
管理者画面の枠を作成
1 parent 7bed8d6 commit 1f9eff0

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

web/app/admin/layout.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Header from "~/components/Header";
2+
import { NavigateByAuthState } from "~/components/common/NavigateByAuthState";
3+
4+
export default function SettingsPageLayout({
5+
children,
6+
}: {
7+
children: React.ReactNode;
8+
}) {
9+
return (
10+
<NavigateByAuthState type="toLoginForUnauthenticated">
11+
<Header title="管理者画面/Admin" />
12+
<div className="absolute top-14 right-0 bottom-14 left-0 overflow-y-auto sm:top-16">
13+
{children}
14+
</div>
15+
</NavigateByAuthState>
16+
);
17+
}

web/app/admin/login/page.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import AdminLoginForm from "~/components/admin/adminLoginForm";
2+
3+
export default function LoginPage() {
4+
return (
5+
<main className="flex items-center justify-center md:h-screen">
6+
<div className="md:-mt-32 relative mx-auto flex w-full max-w-[400px] flex-col space-y-2.5 p-4">
7+
<h2>管理者ログインページ</h2>
8+
<AdminLoginForm />
9+
</div>
10+
</main>
11+
);
12+
}

web/app/admin/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function Admin() {
2+
return <div>管理者画面</div>;
3+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import React from "react";
2+
3+
export default function adminLoginForm() {
4+
return <div></div>;
5+
}

0 commit comments

Comments
 (0)