wrap all instances of mantine hooks used in renderer

This commit is contained in:
jeffvli
2025-11-18 00:29:35 -08:00
parent d349cc3e8d
commit f3bb4187d7
36 changed files with 78 additions and 32 deletions
@@ -1,4 +1,3 @@
import { useSetState } from '@mantine/hooks';
import clsx from 'clsx';
import { AnimatePresence, HTMLMotionProps, motion, Variants } from 'motion/react';
import { Fragment, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
@@ -18,6 +17,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 { useSetState } from '/@/shared/hooks/use-set-state';
import { PlayerData, QueueSong } from '/@/shared/types/domain-types';
const imageVariants: Variants = {
@@ -1,4 +1,3 @@
import { useHotkeys } from '@mantine/hooks';
import { motion, Variants } from 'motion/react';
import { CSSProperties, useLayoutEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -27,6 +26,7 @@ import { Popover } from '/@/shared/components/popover/popover';
import { Select } from '/@/shared/components/select/select';
import { Slider } from '/@/shared/components/slider/slider';
import { Switch } from '/@/shared/components/switch/switch';
import { useHotkeys } from '/@/shared/hooks/use-hotkeys';
import { Platform } from '/@/shared/types/types';
const mainBackground = 'var(--theme-colors-background)';
@@ -1,4 +1,3 @@
import { useHotkeys } from '@mantine/hooks';
import clsx from 'clsx';
import { AnimatePresence, LayoutGroup, motion } from 'motion/react';
import React, { MouseEvent } from 'react';
@@ -24,6 +23,7 @@ import { Separator } from '/@/shared/components/separator/separator';
import { Text } from '/@/shared/components/text/text';
import { Tooltip } from '/@/shared/components/tooltip/tooltip';
import { PlaybackSelectors } from '/@/shared/constants/playback-selectors';
import { useHotkeys } from '/@/shared/hooks/use-hotkeys';
import { LibraryItem } from '/@/shared/types/domain-types';
export const LeftControls = () => {
@@ -1,4 +1,3 @@
import { useHotkeys, useMediaQuery } from '@mantine/hooks';
import { useCallback, WheelEvent } from 'react';
import { useTranslation } from 'react-i18next';
@@ -23,6 +22,8 @@ import { ActionIcon } from '/@/shared/components/action-icon/action-icon';
import { Flex } from '/@/shared/components/flex/flex';
import { Group } from '/@/shared/components/group/group';
import { Rating } from '/@/shared/components/rating/rating';
import { useHotkeys } from '/@/shared/hooks/use-hotkeys';
import { useMediaQuery } from '/@/shared/hooks/use-media-query';
import { LibraryItem, QueueSong, ServerType } from '/@/shared/types/domain-types';
const calculateVolumeUp = (volume: number, volumeWheelStep: number) => {