Merge remote-tracking branch 'overseerr/develop' into develop
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useState, useEffect, Dispatch, SetStateAction } from 'react';
|
||||
import type { Dispatch, SetStateAction } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
/**
|
||||
* A hook to help with debouncing state
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export const INTERACTION_TYPE = {
|
||||
MOUSE: 'mouse',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InteractionContext } from '@app/context/InteractionContext';
|
||||
import { useContext } from 'react';
|
||||
import { InteractionContext } from '../context/InteractionContext';
|
||||
|
||||
export const useIsTouch = (): boolean => {
|
||||
const { isTouch } = useContext(InteractionContext);
|
||||
return isTouch;
|
||||
return isTouch ?? false;
|
||||
};
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import type { LanguageContextProps } from '@app/context/LanguageContext';
|
||||
import { LanguageContext } from '@app/context/LanguageContext';
|
||||
import { useContext } from 'react';
|
||||
import {
|
||||
LanguageContext,
|
||||
LanguageContextProps,
|
||||
} from '../context/LanguageContext';
|
||||
|
||||
const useLocale = (): Omit<LanguageContextProps, 'children'> => {
|
||||
const languageContext = useContext(LanguageContext);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import useSWR from 'swr';
|
||||
import { MediaRequest } from '../../server/entity/MediaRequest';
|
||||
import {
|
||||
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,6 +1,7 @@
|
||||
import { useRouter } from 'next/router';
|
||||
import { useEffect } from 'react';
|
||||
import { Permission, PermissionCheckOptions, useUser } from './useUser';
|
||||
import type { Permission, PermissionCheckOptions } from './useUser';
|
||||
import { useUser } from './useUser';
|
||||
|
||||
const useRouteGuard = (
|
||||
permission: Permission | Permission[],
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import type { Nullable } from '@app/utils/typeHelpers';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
|
||||
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,8 +1,6 @@
|
||||
import type { SettingsContextProps } from '@app/context/SettingsContext';
|
||||
import { SettingsContext } from '@app/context/SettingsContext';
|
||||
import { useContext } from 'react';
|
||||
import {
|
||||
SettingsContext,
|
||||
SettingsContextProps,
|
||||
} from '../context/SettingsContext';
|
||||
|
||||
const useSettings = (): SettingsContextProps => {
|
||||
const settings = useContext(SettingsContext);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { NextRouter, useRouter } from 'next/router';
|
||||
import { ParsedUrlQuery } from 'querystring';
|
||||
import type { NextRouter } from 'next/router';
|
||||
import { useRouter } from 'next/router';
|
||||
import type { ParsedUrlQuery } from 'querystring';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
type UseQueryParamReturnedFunction = (
|
||||
|
||||
@@ -1,12 +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 { MutatorCallback } from 'swr/dist/types';
|
||||
import { UserType } from '../../server/constants/user';
|
||||
import {
|
||||
hasPermission,
|
||||
Permission,
|
||||
PermissionCheckOptions,
|
||||
} from '../../server/lib/permissions';
|
||||
import { NotificationAgentKey } from '../../server/lib/settings';
|
||||
import type { MutatorCallback } from 'swr/dist/types';
|
||||
|
||||
export { Permission, UserType };
|
||||
export type { PermissionCheckOptions };
|
||||
@@ -35,6 +32,8 @@ export interface UserSettings {
|
||||
originalLanguage?: string;
|
||||
locale?: string;
|
||||
notificationTypes: Partial<NotificationAgentTypes>;
|
||||
watchlistSyncMovies?: boolean;
|
||||
watchlistSyncTv?: boolean;
|
||||
}
|
||||
|
||||
interface UserHookResponse {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useState, useEffect, useRef, MutableRefObject } from 'react';
|
||||
import { debounce } from 'lodash';
|
||||
import type { MutableRefObject } from 'react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
const IS_SCROLLING_CHECK_THROTTLE = 200;
|
||||
const BUFFER_HEIGHT = 200;
|
||||
|
||||
Reference in New Issue
Block a user