Skip to content

Commit

Permalink
refactor: 제출 확인 페이지 overflow y scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
alstn113 committed Dec 31, 2024
1 parent 9cf8f21 commit 597d7a8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 20 deletions.
5 changes: 4 additions & 1 deletion web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { NextUIProvider } from '@nextui-org/system';
import ExamProgressLayout from '@/pages/exams/progress/layout/ExamProgressLayout';
import ExamIntroPage from '@/pages/exams/ExamIntroPage';
import ExamSubmissionsViewPage from './pages/exams/submissions/ExamSubmissionsViewPage';
import BaseNoFooterLayout from './components/layouts/base/BaseNoFooterLayout';

const App = () => {
const navigate = useNavigate();
Expand All @@ -29,9 +30,11 @@ const App = () => {
<Route path="about" element={<AboutPage />} />
<Route path="dashboard" element={<DashBoardPage />} />
<Route path="exams/:examId/intro" element={<ExamIntroPage />} />
<Route path="exams/:examId/submissions" element={<ExamSubmissionsViewPage />} />
<Route path="*" element={<NotFoundPage />} />
</Route>
<Route element={<BaseNoFooterLayout />}>
<Route path="exams/:examId/submissions" element={<ExamSubmissionsViewPage />} />
</Route>
<Route path="exams/:examId/progress" element={<ExamProgressLayout />}>
<Route index element={<ExamProgressPage />} />
</Route>
Expand Down
8 changes: 5 additions & 3 deletions web/src/components/analytics/SubmissionDetailContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ const SubmissionDetailsContent = ({
<div className="text-gray-500 text-sm">{fromNowDate(data.submittedAt)}</div>
</div>
</div>
{data.answers.map((answer, index) => (
<SubmissionAnswers key={answer.id} answer={answer} index={index} />
))}
<div className="w-full h-full overflow-y-auto flex flex-col gap-4">
{data.answers.map((answer, index) => (
<SubmissionAnswers key={answer.id} answer={answer} index={index} />
))}
</div>
<div className="mt-4" />
</>
);
Expand Down
17 changes: 17 additions & 0 deletions web/src/components/layouts/base/BaseNoFooterLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Header from '@/components/layouts/base/Header.tsx';
import { Outlet } from 'react-router';

const BaseNoFooterLayout = () => {
return (
<div className="relative flex flex-col h-screen">
<Header />
<div className="h-full w-full overflow-y-auto pb-14 pt-6 bg-gray-100">
<main className="h-full w-full overflow-y-auto bg-white">
<Outlet />
</main>
</div>
</div>
);
};

export default BaseNoFooterLayout;
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const ExamSubmissionsViewContent = ({
))}
</div>
</div>
<div className="flex grow flex-col h-full p-6 overflow-y-auto items-center">
<div className="flex grow flex-col h-full pt-6 items-center overflow-y-auto">
{current.currentSubmissionId && (
<div className="w-full max-w-[750px] h-full flex items-center flex-col gap-4">
<AsyncBoundary>
Expand Down
15 changes: 0 additions & 15 deletions web/src/components/submissions/SubmissionWithAnswerViewPanel.tsx

This file was deleted.

0 comments on commit 597d7a8

Please sign in to comment.