mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56: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.
16 lines
425 B
TypeScript
16 lines
425 B
TypeScript
"use client";
|
|
|
|
import type { ReactNode } from "react";
|
|
import { usePlatform } from "@/hooks/use-platform";
|
|
|
|
export function DesktopOnly({ children }: { children: ReactNode }) {
|
|
const { isDesktop } = usePlatform();
|
|
if (!isDesktop) return null;
|
|
return <>{children}</>;
|
|
}
|
|
|
|
export function WebOnly({ children }: { children: ReactNode }) {
|
|
const { isWeb } = usePlatform();
|
|
if (!isWeb) return null;
|
|
return <>{children}</>;
|
|
}
|