refactor: absolute imports with path alias (#2960) [skip ci]
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { MediaStatus } from '@server/constants/media';
|
||||
import useSWRInfinite from 'swr/infinite';
|
||||
import { MediaStatus } from '../../server/constants/media';
|
||||
import useSettings from './useSettings';
|
||||
|
||||
export interface BaseSearchResult<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { InteractionContext } from '@app/context/InteractionContext';
|
||||
import { useContext } from 'react';
|
||||
import { InteractionContext } from '../context/InteractionContext';
|
||||
|
||||
export const useIsTouch = (): boolean => {
|
||||
const { isTouch } = useContext(InteractionContext);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { LanguageContextProps } from '@app/context/LanguageContext';
|
||||
import { LanguageContext } from '@app/context/LanguageContext';
|
||||
import { useContext } from 'react';
|
||||
import type { LanguageContextProps } from '../context/LanguageContext';
|
||||
import { LanguageContext } from '../context/LanguageContext';
|
||||
|
||||
const useLocale = (): Omit<LanguageContextProps, 'children'> => {
|
||||
const languageContext = useContext(LanguageContext);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import useSWR from 'swr';
|
||||
import type { MediaRequest } from '../../server/entity/MediaRequest';
|
||||
import type { MediaRequest } from '@server/entity/MediaRequest';
|
||||
import type {
|
||||
ServiceCommonServer,
|
||||
ServiceCommonServerWithDetails,
|
||||
} from '../../server/interfaces/api/serviceInterfaces';
|
||||
} from '@server/interfaces/api/serviceInterfaces';
|
||||
import useSWR from 'swr';
|
||||
|
||||
interface OverrideStatus {
|
||||
server?: string;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import type { Nullable } from '@app/utils/typeHelpers';
|
||||
import { useRouter } from 'next/router';
|
||||
import type { Dispatch, SetStateAction } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import type { UrlObject } from 'url';
|
||||
import type { Nullable } from '../utils/typeHelpers';
|
||||
import useDebouncedState from './useDebouncedState';
|
||||
|
||||
type Url = string | UrlObject;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { SettingsContextProps } from '@app/context/SettingsContext';
|
||||
import { SettingsContext } from '@app/context/SettingsContext';
|
||||
import { useContext } from 'react';
|
||||
import type { SettingsContextProps } from '../context/SettingsContext';
|
||||
import { SettingsContext } from '../context/SettingsContext';
|
||||
|
||||
const useSettings = (): SettingsContextProps => {
|
||||
const settings = useContext(SettingsContext);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { UserType } from '@server/constants/user';
|
||||
import type { PermissionCheckOptions } from '@server/lib/permissions';
|
||||
import { hasPermission, Permission } from '@server/lib/permissions';
|
||||
import type { NotificationAgentKey } from '@server/lib/settings';
|
||||
import useSWR from 'swr';
|
||||
import type { MutatorCallback } from 'swr/dist/types';
|
||||
import { UserType } from '../../server/constants/user';
|
||||
import type { PermissionCheckOptions } from '../../server/lib/permissions';
|
||||
import { hasPermission, Permission } from '../../server/lib/permissions';
|
||||
import type { NotificationAgentKey } from '../../server/lib/settings';
|
||||
|
||||
export { Permission, UserType };
|
||||
export type { PermissionCheckOptions };
|
||||
|
||||
Reference in New Issue
Block a user