Skip to content

Commit

Permalink
fix(shared): 레이아웃 useEffect 수정, 에러바운더리 fallback props 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
DongjaJ committed Nov 29, 2023
1 parent ee3b8f6 commit 1e0265d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/shared/components/LocalErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const RetryErrorFallback = ({ error, resetErrorBoundary }: FallbackProps) => {
};

return (
<VStack justifyContent="center" alignItems="center" h="full" spacing="6">
<VStack justify="center" align="center" h="full" spacing="6">
<Heading as="h4" fontSize="xl">
{title}
</Heading>
Expand Down
10 changes: 4 additions & 6 deletions packages/shared/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ export default function Layout({ appType }: LayoutProps) {
const { isPending } = useAccessTokenMutation();

useEffect(() => {
if (pathname === '/') {
if (appType === 'VOLUNTEER_APP') {
navigate('/volunteers');
} else {
navigate('/signin');
}
if (appType === 'VOLUNTEER_APP' && pathname === '/') {
navigate('/volunteers');
} else if (appType === 'SHELTER_APP') {
navigate('/signin');
}

//TODO 액세스 토큰 갱신 api 정상화 되면 연결
Expand Down

0 comments on commit 1e0265d

Please sign in to comment.