Skip to content

Commit

Permalink
Merge pull request #198 from ssu-student-union/feat/#148_jongse_qa_3
Browse files Browse the repository at this point in the history
Feat/#148 jongse qa 3
  • Loading branch information
jongse7 authored Oct 9, 2024
2 parents 32e9b8e + 1cd033f commit ae4a7ff
Show file tree
Hide file tree
Showing 20 changed files with 126 additions and 548 deletions.
4 changes: 2 additions & 2 deletions src/containers/common/Header/const/pathData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export const menuItems = {
},
],
학교생활: [
{ name: '공지사항', path: '/notice?category=central&sub-category=all' },
{ name: '공지사항', path: '/notice' },
// { name: '일정', path: '/menu7' },
{ name: '제휴안내', path: '/partnership' },
{ name: '분실물게시판', path: '/lost-article?category=state' },
{ name: '캠퍼스맵', path: '/campus' },
{ name: '캠퍼스맵', path: '/campus-map' },
],
학생자치기구: [
// { name: '산하기구', path: '/affiliated_organization' },
Expand Down
130 changes: 0 additions & 130 deletions src/pages/audit/component/AuditContent.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions src/pages/audit/component/AuditContentLoading.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/pages/audit/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { HeadLayout } from '@/template/HeadLayout';
import { BodyLayout } from '@/template/BodyLayout';
import { AuditContent } from './component/AuditContent';
import { IntroNavSection } from '../intro/container/IntroNavSection';
import { BoardSelector } from '@/components/Board/BoardSelector';
import { useAuditBoard } from './hooks/useAuditBoard';
import { categoryMap } from './const/data';
import { useNavigate } from 'react-router-dom';
import { BoardContent } from '@/template/board/BoardContent';

export function AuditPage() {
const boardCode = '감사기구게시판';
Expand Down Expand Up @@ -44,7 +44,7 @@ export function AuditPage() {
}}
/>
}
children={<AuditContent initPosts={data?.data.postListResDto} isLoading={isLoading} />}
children={<BoardContent data={data?.data.postListResDto} boardName="감사기구게시판" isLoading={isLoading} />}
totalPages={totalPages}
currentPage={currentPage}
onPageChange={handlePageChange}
Expand Down
109 changes: 0 additions & 109 deletions src/pages/lost-article/component/lostContent.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/pages/lost-article/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BoardSelector } from '@/components/Board/BoardSelector';
import { useNavigate } from 'react-router-dom';
import { categoryMap } from './const/data';
import { useLostBoard } from './hook/useLostBoard';
import { LostContent } from './component/lostContent';
import { BoardContent } from '@/template/board/BoardContent';

export function LostArticlePage() {
const boardCode = '분실물게시판';
Expand Down Expand Up @@ -33,7 +33,7 @@ export function LostArticlePage() {
}}
/>
}
children={<LostContent initPosts={data?.data.postListResDto} isLoading={isLoading} />}
children={<BoardContent data={data?.data.postListResDto} boardName="분실물게시판" isLoading={isLoading} />}
totalPages={totalPages}
currentPage={currentPage}
onPageChange={handlePageChange}
Expand Down
15 changes: 5 additions & 10 deletions src/pages/notice/component/NoticeNavSection.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { BoardNavigator } from '@/components/Board/BoardNavigator';
import { useNoticeSwitch } from '../utils/switchUtils';
import { cn } from '@/libs/utils';

interface NoticeNavSectionProps {
categoryParam: string;
subCategoryParam: string;
handleSelection: (selectedCategory: string) => void;
mainCategoryName: string;
subCategoryDisplayName: string;
className?: string;
isHidden?: boolean;
}
Expand All @@ -18,21 +16,18 @@ export function NoticeNavSection({
className = '',
isHidden = true,
}: NoticeNavSectionProps) {
const handleNoticeSwitchClick = useNoticeSwitch();

const noticeCategories = ['중앙', '단과대']; // 사용자에게 보여줄 한글 카테고리
const selectedCategory = categoryParam; // 선택된 카테고리 (한글)
const noticeCategories = ['중앙', '단과대'];
const selectedCategory = categoryParam;

return (
<>
<div className={isHidden ? 'relative xs:hidden sm:hidden' : 'relative'}>
<div className="absolute left-0 top-1/2 z-0 h-[1px] w-full -translate-y-1/2 transform bg-[#E7E7E7]"></div>
<BoardNavigator
categories={noticeCategories} // 사용자에게 한글로 카테고리 표시
selectedCategory={selectedCategory} // 선택된 카테고리 반영
categories={noticeCategories}
selectedCategory={selectedCategory}
onCategorySelect={(selectedCategory) => {
handleNoticeSwitchClick(noticeCategories.indexOf(selectedCategory)); // 스위치 토글
handleSelection(selectedCategory); // 카테고리 변경
handleSelection(selectedCategory);
}}
className={cn(`relative z-10 mx-[200px] bg-white md:mx-[60px]`, className)}
/>
Expand Down
Loading

0 comments on commit ae4a7ff

Please sign in to comment.