Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/사이드바 라우터 연결 #271 #407

Merged
merged 2 commits into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/Navigation/SubCategoryNav.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { CategoryMenu } from '@constants/category';
import { ListItemButton, ListItemText } from '@mui/material';

Expand All @@ -8,7 +9,7 @@ interface SubCategoryNavProps {

const SubCategoryNav = ({ subcategory }: SubCategoryNavProps) => {
return (
<ListItemButton className="w-full">
<ListItemButton component={Link} to={`/${subcategory.path}`} className="w-full">
<ListItemText primary={`• ${subcategory.name}`} />
</ListItemButton>
);
Expand Down
33 changes: 33 additions & 0 deletions src/constants/category.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface CategoryMenu {
id: number;
name: string;
path?: string;
}
export interface Category extends CategoryMenu {
subCategories: CategoryMenu[];
Expand All @@ -14,30 +15,37 @@ const CATEGORIES: Category[] = [
{
id: 101,
name: '공지사항',
path: '#',
},
{
id: 102,
name: '건의사항',
path: '#',
},
{
id: 103,
name: '정보게시판',
path: '#',
},
{
id: 104,
name: '자유게시판',
path: '#',
},
{
id: 105,
name: '익명게시판',
path: '#',
},
{
id: 106,
name: '졸업생게시판',
path: '#',
},
{
id: 107,
name: '시험게시판',
path: '#',
},
],
},
Expand All @@ -48,18 +56,22 @@ const CATEGORIES: Category[] = [
{
id: 201,
name: '스터디',
path: 'study',
},
{
id: 202,
name: '발표자료',
path: '#',
},
{
id: 203,
name: '기술문서',
path: '#',
},
{
id: 204,
name: '회계부',
path: '#',
},
],
},
Expand All @@ -70,10 +82,12 @@ const CATEGORIES: Category[] = [
{
id: 301,
name: '도서',
path: '#',
},
{
id: 302,
name: '기자재',
path: '#',
},
],
},
Expand All @@ -84,14 +98,17 @@ const CATEGORIES: Category[] = [
{
id: 401,
name: '세미나 출석',
path: 'seminar',
},
{
id: 402,
name: '활동인원조사',
path: '#',
},
{
id: 403,
name: '임원진 선거',
path: '#',
},
],
},
Expand All @@ -102,10 +119,12 @@ const CATEGORIES: Category[] = [
{
id: 501,
name: '랭킹',
path: '#',
},
{
id: 502,
name: '게임',
path: '#',
},
],
},
Expand All @@ -116,30 +135,37 @@ const CATEGORIES: Category[] = [
{
id: 601,
name: 'CTF',
path: '#',
},
{
id: 602,
name: 'CHALLENGES',
path: '#',
},
{
id: 603,
name: 'SCOREBOARD',
path: '#',
},
{
id: 604,
name: 'TEAM',
path: '#',
},
{
id: 605,
name: '문제관리',
path: '#',
},
{
id: 606,
name: '제출로그',
path: '#',
},
{
id: 607,
name: '대회운영',
path: '#',
},
],
},
Expand All @@ -150,30 +176,37 @@ const CATEGORIES: Category[] = [
{
id: 701,
name: '직책관리',
path: '#',
},
{
id: 702,
name: '선거관리',
path: '#',
},
{
id: 703,
name: '도서관리',
path: 'admin/libraryManage',
},
{
id: 704,
name: '기자재관리',
path: '#',
},
{
id: 705,
name: '세미나관리',
path: 'admin/seminarManage',
},
{
id: 706,
name: '활동인원관리',
path: '#',
},
{
id: 707,
name: '상벌점관리',
path: '#',
},
],
},
Expand Down