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