Skip to content

Commit

Permalink
Refactor : Profile component and update routingHandlers
Browse files Browse the repository at this point in the history
  • Loading branch information
jiwonh423 committed Jan 21, 2024
1 parent 7827d0e commit 06b0678
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions frontend/src/pages/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ import useSetNavbarHighlight from '../hooks/useSetNavbarHighlight';
const TopicCardList = lazy(() => import('../components/TopicCardList'));

function Profile() {
const { routePage } = useNavigator();
const { routingHandlers } = useNavigator();
useSetLayoutWidth(FULLSCREEN);
useSetNavbarHighlight('profile');

const goToNewTopic = () => {
routePage('/new-topic');
};

return (
<Wrapper>
<MyInfoWrapper $justifyContent="center" $alignItems="center">
Expand Down Expand Up @@ -56,10 +52,9 @@ function Profile() {
<Suspense fallback={<TopicListSkeleton />}>
<TopicCardList
url="/members/my/topics"
errorMessage="๋กœ๊ทธ์ธ ํ›„ ์ด์šฉํ•ด์ฃผ์„ธ์š”."
commentWhenEmpty="์ถ”๊ฐ€ํ•˜๊ธฐ ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์ง€๋„๋ฅผ ์ถ”๊ฐ€ํ•ด๋ณด์„ธ์š”."
pageCommentWhenEmpty="์ง€๋„ ๋งŒ๋“ค๋Ÿฌ ๊ฐ€๊ธฐ"
routePage={goToNewTopic}
routePageName="๋ฉ”์ธ ํŽ˜์ด์ง€๋กœ ๊ฐ€๊ธฐ"
routePage={routingHandlers.home}
/>
</Suspense>

Expand Down

0 comments on commit 06b0678

Please sign in to comment.