mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
fix ipc in remote hook
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import isElectron from 'is-electron';
|
import isElectron from 'is-electron';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { ipc } from 'src/preload/ipc';
|
|
||||||
|
|
||||||
import { usePlayerEvents } from '/@/renderer/features/player/audio-player/hooks/use-player-events';
|
import { usePlayerEvents } from '/@/renderer/features/player/audio-player/hooks/use-player-events';
|
||||||
import { useCreateFavorite } from '/@/renderer/features/shared/mutations/create-favorite-mutation';
|
import { useCreateFavorite } from '/@/renderer/features/shared/mutations/create-favorite-mutation';
|
||||||
@@ -11,6 +10,7 @@ import { LibraryItem, Song } from '/@/shared/types/domain-types';
|
|||||||
import { PlayerShuffle } from '/@/shared/types/types';
|
import { PlayerShuffle } from '/@/shared/types/types';
|
||||||
|
|
||||||
const remote = isElectron() ? window.api.remote : null;
|
const remote = isElectron() ? window.api.remote : null;
|
||||||
|
const ipc = isElectron() ? window.api.ipc : null;
|
||||||
|
|
||||||
export const useRemote = () => {
|
export const useRemote = () => {
|
||||||
const { mediaSkipForward, setTimestamp, setVolume } = usePlayerActions();
|
const { mediaSkipForward, setTimestamp, setVolume } = usePlayerActions();
|
||||||
|
|||||||
Reference in New Issue
Block a user