refactor(core): move hooks to core (#5458)

* move @toeverything/hooks -> @affine/core/hooks
* delete @toeverything/hooks

hooks are all business-related logic and are deeply coupled with other parts.

Move them into the core and then reconstruct them by feature.
This commit is contained in:
EYHN
2024-01-02 08:05:46 +00:00
parent 6862b7deaf
commit 4b217e6b89
95 changed files with 99 additions and 347 deletions

View File

@@ -5,12 +5,12 @@ import {
} from '@affine/core/commands';
import { CMDKQuickSearchModal } from '@affine/core/components/pure/cmdk';
import { HighlightLabel } from '@affine/core/components/pure/cmdk/highlight';
import { useWorkspace } from '@affine/core/hooks/use-workspace';
import { WorkspaceFlavour } from '@affine/env/workspace';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { currentWorkspaceAtom } from '@affine/workspace/atom';
import type { Page } from '@blocksuite/store';
import type { Meta, StoryFn } from '@storybook/react';
import { useWorkspace } from '@toeverything/hooks/use-workspace';
import { useStore } from 'jotai';
import { useEffect, useLayoutEffect, useState } from 'react';
import { withRouter } from 'storybook-addon-react-router-v6';