mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
- Updated the development script to include a build step before launching the app. - Refactored the registration of quick ask and autocomplete functionalities to be asynchronous, ensuring proper initialization. - Introduced IPC channels for getting and setting keyboard shortcuts, allowing users to customize their experience. - Enhanced the platform module to support better interaction with the Electron API for clipboard operations. - Improved the user interface for managing keyboard shortcuts in the settings dialog, providing a more intuitive experience.
12 lines
434 B
TypeScript
12 lines
434 B
TypeScript
import { useContext } from "react";
|
|
import { PlatformContext, type PlatformContextValue } from "@/contexts/platform-context";
|
|
|
|
export function usePlatform(): Pick<PlatformContextValue, "isDesktop" | "isWeb"> {
|
|
const { isDesktop, isWeb } = useContext(PlatformContext);
|
|
return { isDesktop, isWeb };
|
|
}
|
|
|
|
export function useElectronAPI(): ElectronAPI | null {
|
|
const { electronAPI } = useContext(PlatformContext);
|
|
return electronAPI;
|
|
}
|