Skip to content

Commit

Permalink
Merge pull request #148 from Team-INSERT/refactor/docs-teacher
Browse files Browse the repository at this point in the history
refactor : 선생님 페이지 배열로 리팩터링
  • Loading branch information
Ubinquitous authored Apr 16, 2024
2 parents 90d89ef + 384437e commit 36b30f0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/(docs)/teacher/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ export const metadata = generateOpenGraph({

const Page = async () => {
const queryClient = getQueryClient();
Promise.all([
await queryClient.prefetchQuery(docsQuery.list("teacher")),
await queryClient.prefetchQuery(docsQuery.list("major_teacher")),
await queryClient.prefetchQuery(docsQuery.list("mentor_teacher")),
]);
Promise.all(
teacherClassifyList.map((docsType) => queryClient.prefetchQuery(docsQuery.list(docsType))),
);

return (
<HydrationBoundary state={dehydrate(queryClient)}>
{["teacher", "major_teacher", "mentor_teacher"].map((classify) => (
{teacherClassifyList.map((classify) => (
<DocsList classify={classify} key={classify} />
))}
</HydrationBoundary>
);
};

const teacherClassifyList = ["teacher", "major_teacher", "mentor_teacher"];

export default Page;

0 comments on commit 36b30f0

Please sign in to comment.