diff --git a/packages/frontend/component/src/components/affine-banner/local-demo-tips.tsx b/packages/frontend/component/src/components/affine-banner/local-demo-tips.tsx index 56a82848c4..b42be3727c 100644 --- a/packages/frontend/component/src/components/affine-banner/local-demo-tips.tsx +++ b/packages/frontend/component/src/components/affine-banner/local-demo-tips.tsx @@ -1,5 +1,5 @@ import { Button, IconButton } from '@affine/component/ui/button'; -import { useAFFiNEI18N } from '@affine/i18n/hooks'; +import { useI18n } from '@affine/i18n'; import { CloseIcon } from '@blocksuite/icons/rc'; import { useCallback } from 'react'; @@ -18,7 +18,7 @@ export const LocalDemoTips = ({ onLogin, onEnableCloud, }: LocalDemoTipsProps) => { - const t = useAFFiNEI18N(); + const t = useI18n(); const buttonLabel = isLoggedIn ? t['Enable AFFiNE Cloud']() : t['Sign in and Enable'](); diff --git a/packages/frontend/component/src/components/affine-other-page-layout/layout.tsx b/packages/frontend/component/src/components/affine-other-page-layout/layout.tsx index b42b099fa3..197a00c508 100644 --- a/packages/frontend/component/src/components/affine-other-page-layout/layout.tsx +++ b/packages/frontend/component/src/components/affine-other-page-layout/layout.tsx @@ -1,5 +1,5 @@ import { Button } from '@affine/component/ui/button'; -import { useAFFiNEI18N } from '@affine/i18n/hooks'; +import { useI18n } from '@affine/i18n'; import { Logo1Icon } from '@blocksuite/icons/rc'; import { useCallback } from 'react'; @@ -12,7 +12,7 @@ export const AffineOtherPageLayout = ({ }: { children: React.ReactNode; }) => { - const t = useAFFiNEI18N(); + const t = useI18n(); const openDownloadLink = useCallback(() => { open(runtimeConfig.downloadUrl, '_blank'); diff --git a/packages/frontend/component/src/components/affine-other-page-layout/use-nav-config.ts b/packages/frontend/component/src/components/affine-other-page-layout/use-nav-config.ts index 379da19bf7..bafc81c3f0 100644 --- a/packages/frontend/component/src/components/affine-other-page-layout/use-nav-config.ts +++ b/packages/frontend/component/src/components/affine-other-page-layout/use-nav-config.ts @@ -1,8 +1,8 @@ -import { useAFFiNEI18N } from '@affine/i18n/hooks'; +import { useI18n } from '@affine/i18n'; import { useMemo } from 'react'; export const useNavConfig = () => { - const t = useAFFiNEI18N(); + const t = useI18n(); return useMemo( () => [ { diff --git a/packages/frontend/component/src/components/auth-components/back-button.tsx b/packages/frontend/component/src/components/auth-components/back-button.tsx index 668e611c7c..eade042a77 100644 --- a/packages/frontend/component/src/components/auth-components/back-button.tsx +++ b/packages/frontend/component/src/components/auth-components/back-button.tsx @@ -1,4 +1,4 @@ -import { useAFFiNEI18N } from '@affine/i18n/hooks'; +import { useI18n } from '@affine/i18n'; import { ArrowLeftSmallIcon } from '@blocksuite/icons/rc'; import type { FC } from 'react'; @@ -6,7 +6,7 @@ import type { ButtonProps } from '../../ui/button'; import { Button } from '../../ui/button'; export const BackButton: FC = props => { - const t = useAFFiNEI18N(); + const t = useI18n(); return (