Skip to content

Commit 5cf0285

Browse files
committed
feat: page ์ถ”๊ฐ€
1 parent 4291395 commit 5cf0285

File tree

5 files changed

+61
-3
lines changed

5 files changed

+61
-3
lines changed

โ€Žsrc/main.tsxโ€Ž

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { JoinPage, LoginPage, ResetPwPage, NotFound, Policy } from './pages/inde
1010
import ProtectedRoute from './providers/ProtectedRoute.tsx';
1111

1212
import UserInvite from './components/common/UserInvite.tsx';
13+
import EditGroupPage from './pages/EditGroupPage.tsx';
14+
import AddGroupPage from './pages/AddGroupPage.tsx';
1315

1416
const router = createBrowserRouter([
1517
{
@@ -24,9 +26,17 @@ const router = createBrowserRouter([
2426
),
2527
},
2628
{
27-
path: 'userInvite',
29+
path: '/userInvite',
2830
element: <UserInvite />,
2931
},
32+
{
33+
path: '/edit-group/:id',
34+
element: <EditGroupPage />,
35+
},
36+
{
37+
path: '/add-group',
38+
element: <AddGroupPage />,
39+
},
3040
{
3141
path: '/login',
3242
element: <LoginPage />,

โ€Žsrc/pages/AddGroupPage.tsxโ€Ž

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import GroupForm from '@/components/GroupForm/GroupForm';
2+
import AppBar from '@/components/common/AppBar';
3+
4+
const AddGroupPage = () => {
5+
const handleSubmit: React.FormEventHandler<HTMLFormElement> = (e) => {
6+
e.preventDefault();
7+
const formData = new FormData(e.currentTarget);
8+
console.log(formData);
9+
};
10+
11+
return (
12+
<div className="flex min-h-dvh w-screen flex-col overflow-x-hidden px-6">
13+
<AppBar backButton title={'๋ชจ์ž„ ์ผ์ • ๋“ฑ๋กํ•˜๊ธฐ'} />
14+
<GroupForm onSubmit={handleSubmit} />
15+
</div>
16+
);
17+
};
18+
19+
export default AddGroupPage;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import GroupForm from '@/components/GroupForm/GroupForm';
2+
import AppBar from '@/components/common/AppBar';
3+
4+
const EditGroupPage = () => {
5+
const handleSubmit: React.FormEventHandler<HTMLFormElement> = (e) => {
6+
e.preventDefault();
7+
const formData = new FormData(e.currentTarget);
8+
console.log(formData);
9+
};
10+
11+
return (
12+
<div className="flex min-h-dvh w-screen flex-col overflow-x-hidden px-4">
13+
<AppBar backButton title={'๋ชจ์ž„ ์ผ์ • ๋“ฑ๋กํ•˜๊ธฐ'} />
14+
{/**
15+
* // TODO: ๊ธฐ๋ณธ๊ฐ’์„ ์„œ๋ฒ„์—์„œ ๋ฐ›์•„์™€์„œ ๋„˜๊ฒจ์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค.
16+
*/}
17+
<GroupForm
18+
onSubmit={handleSubmit}
19+
name=""
20+
description=""
21+
endDate={new Date().toString()}
22+
memo=""
23+
startDate={new Date().toString()}
24+
/>
25+
</div>
26+
);
27+
};
28+
29+
export default EditGroupPage;

โ€Žsrc/pages/index.tsโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ResetPwPage from './ResetPwPage';
22
import JoinPage from './JoinPage';
3-
import Loading from './Loading';
3+
import Loading from '../components/common/Loading/Loading';
44
import LoginPage from './LoginPage';
55
import { NotFound } from './Notfound';
66

โ€Žsrc/styles/index.cssโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@tailwind components;
33
@tailwind utilities;
44

5-
65
.userInvite {
76
display: flex;
87
justify-content: center;
@@ -14,6 +13,7 @@
1413
}
1514
.userInvite svg {
1615
margin: auto;
16+
}
1717

1818
@media (min-width: 1024px) {
1919
.drawer-toggle {

0 commit comments

Comments
ย (0)