mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 07:17:00 +08:00
chore: update import package name
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { NotFoundTitle, PageContainer } from './styles';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
export const NotfoundPage = () => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
StyledModalFooter,
|
||||
} from './style';
|
||||
import bg from '@/components/contact-modal/bg.png';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
const linkList = [
|
||||
{
|
||||
icon: <GithubIcon />,
|
||||
|
||||
@@ -15,7 +15,7 @@ import { useTheme } from '@/providers/ThemeProvider';
|
||||
import { EdgelessIcon, PaperIcon } from './Icons';
|
||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
const PaperItem = ({ active }: { active?: boolean }) => {
|
||||
const {
|
||||
theme: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { IconButton, IconButtonProps } from '@/ui/button';
|
||||
import { Tooltip } from '@/ui/tooltip';
|
||||
import { ArrowDownIcon } from '@blocksuite/icons';
|
||||
import { useModal } from '@/providers/GlobalModalProvider';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
export const QuickSearchButton = ({
|
||||
onClick,
|
||||
...props
|
||||
|
||||
@@ -16,7 +16,7 @@ import { usePageHelper } from '@/hooks/use-page-helper';
|
||||
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||
import { toast } from '@/ui/toast';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
const PopoverContent = () => {
|
||||
const { editor } = useAppState();
|
||||
const { toggleFavoritePage, toggleDeletePage } = usePageHelper();
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './Icons';
|
||||
import Grow from '@mui/material/Grow';
|
||||
import { Tooltip } from '@/ui/tooltip';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { useModal } from '@/providers/GlobalModalProvider';
|
||||
import { useTheme } from '@/providers/ThemeProvider';
|
||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||
|
||||
@@ -6,7 +6,7 @@ import Loading from '@/components/loading';
|
||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||
import { useAppState } from '@/providers/app-state-provider/context';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
// import { Tooltip } from '@/ui/tooltip';
|
||||
type ImportModalProps = {
|
||||
open: boolean;
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
} from '@blocksuite/icons';
|
||||
import { toast } from '@/ui/toast';
|
||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
||||
const { id, favorite } = pageMeta;
|
||||
const { openPage } = usePageHelper();
|
||||
|
||||
@@ -24,7 +24,7 @@ import { useAppState } from '@/providers/app-state-provider/context';
|
||||
import { toast } from '@/ui/toast';
|
||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||
import { useTheme } from '@/providers/ThemeProvider';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
const FavoriteTag = ({
|
||||
pageMeta: { favorite, id },
|
||||
}: {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { StyledModalFooterContent } from './style';
|
||||
import { useModal } from '@/providers/GlobalModalProvider';
|
||||
import { Command } from 'cmdk';
|
||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
export const Footer = (props: { query: string }) => {
|
||||
const { triggerQuickSearchModal } = useModal();
|
||||
const { openPage, createPage } = usePageHelper();
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useAppState } from '@/providers/app-state-provider';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useSwitchToConfig } from './config';
|
||||
import { NoResultSVG } from './NoResultSVG';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import usePageHelper from '@/hooks/use-page-helper';
|
||||
import usePageMetaList from '@/hooks/use-page-meta-list';
|
||||
export const Results = (props: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AllPagesIcon, FavouritesIcon, TrashIcon } from '@blocksuite/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
|
||||
export const useSwitchToConfig = (
|
||||
currentWorkspaceId: string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
interface ShortcutTip {
|
||||
[x: string]: string;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
import Slide from '@mui/material/Slide';
|
||||
import { ModalCloseButton } from '@/ui/modal';
|
||||
import { getUaHelper } from '@/utils';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
type ModalProps = {
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
|
||||
@@ -30,7 +30,7 @@ import { IconButton } from '@/ui/button';
|
||||
import useLocalStorage from '@/hooks/use-local-storage';
|
||||
import usePageMetaList from '@/hooks/use-page-meta-list';
|
||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
|
||||
const FavoriteList = ({ showList }: { showList: boolean }) => {
|
||||
const { openPage } = usePageHelper();
|
||||
|
||||
@@ -18,7 +18,7 @@ import { useEffect } from 'react';
|
||||
import { useAppState } from '@/providers/app-state-provider';
|
||||
import { PageLoading } from '@/components/loading';
|
||||
import Head from 'next/head';
|
||||
import '@/libs/i18n';
|
||||
import '@affine/i18n';
|
||||
|
||||
const ThemeProvider = dynamic(() => import('@/providers/ThemeProvider'), {
|
||||
ssr: false,
|
||||
|
||||
@@ -4,7 +4,7 @@ import usePageMetaList from '@/hooks/use-page-meta-list';
|
||||
import { PageListHeader } from '@/components/header';
|
||||
import { ReactElement } from 'react';
|
||||
import WorkspaceLayout from '@/components/workspace-layout';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
const All = () => {
|
||||
const pageMetaList = usePageMetaList();
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FavouritesIcon } from '@blocksuite/icons';
|
||||
import usePageMetaList from '@/hooks/use-page-meta-list';
|
||||
import { ReactElement } from 'react';
|
||||
import WorkspaceLayout from '@/components/workspace-layout';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
export const Favorite = () => {
|
||||
const pageMetaList = usePageMetaList();
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { TrashIcon } from '@blocksuite/icons';
|
||||
import usePageMetaList from '@/hooks/use-page-meta-list';
|
||||
import { ReactElement } from 'react';
|
||||
import WorkspaceLayout from '@/components/workspace-layout';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
export const Trash = () => {
|
||||
const pageMetaList = usePageMetaList();
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
StyledModalWrapper,
|
||||
} from '@/ui/confirm/styles';
|
||||
import { Button } from '@/ui/button';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
export type ConfirmProps = {
|
||||
title?: string;
|
||||
content?: string;
|
||||
|
||||
Reference in New Issue
Block a user