Skip to content

Commit f9340ac

Browse files
committed
✨ feat : Create a group select page layout
- Users can see a page where they can choose which groups they belong to Related issue: #50
1 parent 50eaafd commit f9340ac

File tree

9 files changed

+115
-3
lines changed

9 files changed

+115
-3
lines changed

src/app/components/group/Created.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const Created = () => {
2+
return (
3+
<>
4+
<div className="border rounded-lg w-80 h-72 border-gray-300 mr-10 mb-10 text-black">
5+
Created Group
6+
</div>
7+
</>
8+
);
9+
};
10+
11+
export default Created;

src/app/components/group/Favorite.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const Favorite = () => {
2+
return (
3+
<>
4+
<div className="border rounded-lg w-80 h-72 border-gray-300 mr-10 mb-10 text-black">
5+
Favorite Group
6+
</div>
7+
</>
8+
);
9+
};
10+
11+
export default Favorite;

src/app/components/group/Header.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Image from 'next/image';
2+
import {folder} from '@/public/svgs/group';
3+
4+
const Header = () => {
5+
return (
6+
<div className="mt-6">
7+
<div className="flex items-center justify-between me-10">
8+
<h1 className="text-black text-5xl font-medium">Groups</h1>
9+
<Image src={folder} width={70} height={70} alt={'folder'} />
10+
</div>
11+
<div className="border border-gray-200 w-11/12 mt-4"></div>
12+
</div>
13+
);
14+
};
15+
16+
export default Header;

src/app/components/group/Invite.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const Invite = () => {
2+
return <>invite page</>;
3+
};
4+
5+
export default Invite;

src/app/components/group/Joined.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import {Favorite, Created} from '.';
2+
3+
const Joined = () => {
4+
return (
5+
<>
6+
<Favorite />
7+
<Created />
8+
<div className="border rounded-lg w-80 h-72 border-gray-300 mr-10 mb-10 text-black">
9+
Normal Group1
10+
</div>
11+
<div className="border rounded-lg w-80 h-72 border-gray-300 mr-10 mb-10 text-black">
12+
Normal Group2
13+
</div>
14+
</>
15+
);
16+
};
17+
18+
export default Joined;

src/app/components/group/Main.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
'use client';
2+
3+
import React, {useState} from 'react';
4+
import {Favorite, Created, Joined, Invite, Waiting} from '.';
5+
import {Dashboard, TabsMapping} from '@/src/components/dashboard';
6+
import Header from './Header';
7+
8+
const Main = () => {
9+
const tabs = ['Joined', 'Created', 'Favorite', 'Invite', 'Waiting'];
10+
const [activeTab, setActiveTab] = useState(tabs[0]);
11+
const tabMapping = {
12+
Joined: <Joined />,
13+
Created: <Created />,
14+
Favorite: <Favorite />,
15+
Invite: <Invite />,
16+
Waiting: <Waiting />,
17+
};
18+
19+
return (
20+
<div className="flex h-full ms-10 bg-gray-200">
21+
<div className="flex-grow bg-white">
22+
<Header />
23+
<Dashboard
24+
activeTab={activeTab}
25+
setActiveTab={setActiveTab}
26+
tabs={tabs}
27+
/>
28+
<div className="flex flex-wrap ms-2 mt-12 ">
29+
<TabsMapping activeTab={activeTab} tabMapping={tabMapping} />
30+
</div>
31+
</div>
32+
</div>
33+
);
34+
};
35+
36+
export default Main;

src/app/components/group/Waiting.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const Waiting = () => {
2+
return <>waiting page</>;
3+
};
4+
5+
export default Waiting;

src/app/components/group/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Main from './Main';
2+
import Favorite from './Favorite';
3+
import Created from './Created';
4+
import Invite from './Invite';
5+
import Waiting from './Waiting';
6+
import Joined from './Joined';
7+
8+
export {Main, Favorite, Created, Invite, Waiting, Joined};

src/app/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import {Main} from './components/group';
2+
13
export default function Page() {
24
return (
3-
<div>
4-
<h1>yuminnk-nextjs-template</h1>
5-
</div>
5+
<>
6+
<Main />
7+
</>
68
);
79
}

0 commit comments

Comments
 (0)