feat: it is the first time to integrate useTranslation

This commit is contained in:
tzhangchi
2022-12-18 07:54:49 +08:00
parent 9b19f18c09
commit ed24147ce1
@@ -26,7 +26,7 @@ import { useModal } from '@/providers/global-modal-provider';
import { IconButton } from '@/ui/button';
import useLocalStorage from '@/hooks/use-local-storage';
import { useTranslation } from '@/libs/i18n';
const FavoriteList = ({ showList }: { showList: boolean }) => {
const { pageList, openPage } = useEditor();
const router = useRouter();
@@ -65,7 +65,7 @@ export const WorkSpaceSliderBar = () => {
const [showTip, setShowTip] = useState(false);
const [show, setShow] = useLocalStorage('AFFINE_SLIDE_BAR', false, true);
const { t } = useTranslation();
return (
<>
<StyledSliderBar show={show}>
@@ -80,7 +80,7 @@ export const WorkSpaceSliderBar = () => {
</Tooltip>
<Link href={{ pathname: '/page-list/all' }}>
<StyledListItem active={router.pathname === '/page-list/all'}>
<AllPagesIcon /> All pages
<AllPagesIcon /> {t('All pages')}
</StyledListItem>
</Link>
<StyledListItem active={router.pathname === '/page-list/favorite'}>