mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +02:00
wrap localstorage hook
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { useLocalStorage } from '@mantine/hooks';
|
||||
import { openContextModal } from '@mantine/modals';
|
||||
import isElectron from 'is-electron';
|
||||
import { ChangeEvent } from 'react';
|
||||
@@ -19,6 +18,7 @@ import { ContextModalVars } from '/@/shared/components/modal/modal';
|
||||
import { Stack } from '/@/shared/components/stack/stack';
|
||||
import { Switch } from '/@/shared/components/switch/switch';
|
||||
import { Text } from '/@/shared/components/text/text';
|
||||
import { useLocalStorage } from '/@/shared/hooks/use-local-storage';
|
||||
import { ServerType } from '/@/shared/types/domain-types';
|
||||
|
||||
const localSettings = isElectron() ? window.api.localSettings : null;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useLocalStorage } from '@mantine/hooks';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { parseAsString, useQueryState } from 'nuqs';
|
||||
|
||||
@@ -6,6 +5,7 @@ import { sharedQueries } from '/@/renderer/features/shared/api/shared-api';
|
||||
import { FolderButton } from '/@/renderer/features/shared/components/folder-button';
|
||||
import { useCurrentServer } from '/@/renderer/store';
|
||||
import { DropdownMenu } from '/@/shared/components/dropdown-menu/dropdown-menu';
|
||||
import { useLocalStorage } from '/@/shared/hooks/use-local-storage';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
interface ListMusicFolderDropdownProps {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useLocalStorage } from '@mantine/hooks';
|
||||
import { parseAsString, useQueryState } from 'nuqs';
|
||||
|
||||
import i18n from '/@/i18n/i18n';
|
||||
@@ -6,6 +5,7 @@ import { FILTER_KEYS } from '/@/renderer/features/shared/utils';
|
||||
import { useCurrentServer } from '/@/renderer/store';
|
||||
import { Button } from '/@/shared/components/button/button';
|
||||
import { DropdownMenu } from '/@/shared/components/dropdown-menu/dropdown-menu';
|
||||
import { useLocalStorage } from '/@/shared/hooks/use-local-storage';
|
||||
import { AlbumListSort, LibraryItem, ServerType, SortOrder } from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useLocalStorage } from '@mantine/hooks';
|
||||
import { parseAsString, useQueryState } from 'nuqs';
|
||||
|
||||
import { OrderToggleButton } from '/@/renderer/features/shared/components/order-toggle-button';
|
||||
import { FILTER_KEYS } from '/@/renderer/features/shared/utils';
|
||||
import { useLocalStorage } from '/@/shared/hooks/use-local-storage';
|
||||
import { SortOrder } from '/@/shared/types/domain-types';
|
||||
import { ItemListKey } from '/@/shared/types/types';
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useLocalStorage } from '@mantine/hooks';
|
||||
import { useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -10,6 +9,7 @@ import { Group } from '/@/shared/components/group/group';
|
||||
import { Icon } from '/@/shared/components/icon/icon';
|
||||
import { Stack } from '/@/shared/components/stack/stack';
|
||||
import { Text } from '/@/shared/components/text/text';
|
||||
import { useLocalStorage } from '/@/shared/hooks/use-local-storage';
|
||||
|
||||
export function IsUpdatedDialog() {
|
||||
const { version } = packageJson;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import { useLocalStorage as useMantineLocalStorage } from '@mantine/hooks';
|
||||
|
||||
export const useLocalStorage = useMantineLocalStorage;
|
||||
Reference in New Issue
Block a user