refactor(core): adjust core struct (#8218)

packages/frontend/core/src

hooks -> components/hooks
atoms -> components/atoms
layouts -> components/layouts
providers -> components/providers
mixpanel -> @affine/track
~~shared~~
~~unexpected-application-state~~
This commit is contained in:
EYHN
2024-09-13 11:31:21 +00:00
parent fc7e7a37ee
commit 5e56ec65e3
274 changed files with 552 additions and 902 deletions
@@ -1,6 +1,6 @@
import { Button } from '@affine/admin/components/ui/button';
import { Input } from '@affine/admin/components/ui/input';
import { useQuery } from '@affine/core/hooks/use-query';
import { useQuery } from '@affine/core/components/hooks/use-query';
import { getUserByEmailQuery } from '@affine/graphql';
import { PlusIcon } from 'lucide-react';
import type { SetStateAction } from 'react';
@@ -1,9 +1,9 @@
import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
import {
useMutateQueryResource,
useMutation,
} from '@affine/core/hooks/use-mutation';
import { useQuery } from '@affine/core/hooks/use-query';
} from '@affine/core/components/hooks/use-mutation';
import { useQuery } from '@affine/core/components/hooks/use-query';
import {
createChangePasswordUrlMutation,
createUserMutation,
@@ -1,4 +1,4 @@
import { useQuery } from '@affine/core/hooks/use-query';
import { useQuery } from '@affine/core/components/hooks/use-query';
import { listUsersQuery } from '@affine/graphql';
import { useState } from 'react';
@@ -1,9 +1,9 @@
import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
import {
useMutateQueryResource,
useMutation,
} from '@affine/core/hooks/use-mutation';
import { useQuery } from '@affine/core/hooks/use-query';
} from '@affine/core/components/hooks/use-mutation';
import { useQuery } from '@affine/core/components/hooks/use-query';
import { getPromptsQuery, updatePromptMutation } from '@affine/graphql';
import { toast } from 'sonner';
@@ -1,5 +1,5 @@
import { useMutateQueryResource } from '@affine/core/hooks/use-mutation';
import { useQuery } from '@affine/core/hooks/use-query';
import { useMutateQueryResource } from '@affine/core/components/hooks/use-mutation';
import { useQuery } from '@affine/core/components/hooks/use-query';
import type { GetCurrentUserFeaturesQuery } from '@affine/graphql';
import {
adminServerConfigQuery,
@@ -1,4 +1,4 @@
import { useQueryImmutable } from '@affine/core/hooks/use-query';
import { useQueryImmutable } from '@affine/core/components/hooks/use-query';
import { getServerServiceConfigsQuery } from '@affine/graphql';
import { useMemo } from 'react';
@@ -1,4 +1,4 @@
import { useQuery } from '@affine/core/hooks/use-query';
import { useQuery } from '@affine/core/components/hooks/use-query';
import { getServerRuntimeConfigQuery } from '@affine/graphql';
import { useMemo } from 'react';
@@ -1,9 +1,9 @@
import { notify } from '@affine/component';
import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
import {
useMutateQueryResource,
useMutation,
} from '@affine/core/hooks/use-mutation';
} from '@affine/core/components/hooks/use-mutation';
import {
getServerRuntimeConfigQuery,
updateServerRuntimeConfigsMutation,