Skip to content

Commit f5823cf

Browse files
committed
fix: storybook component
1 parent b8599a7 commit f5823cf

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/containers/TodoList/TodoList.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ const TodoList = () => {
1818
query: { todoListId },
1919
} = useRouter();
2020

21-
useBackButton('/');
22-
2321
const { data, isLoading } = useTodoList(todoListId as string);
22+
useBackButton(!!data ? `/category/${data.categoryId}` : '/');
2423
const { open } = usePopup();
2524
const { t } = useTranslation();
2625

src/hooks/useTranslation/useTranslation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useRouter } from 'next/router';
55

66
export const useTranslation = () => {
77
const { locale } = useRouter();
8-
const translation = translations[locale as Locales];
8+
const translation = translations[(locale || 'en') as Locales];
99

1010
const translator = (
1111
key: keyof typeof translation,

0 commit comments

Comments
 (0)