mirror of
https://github.com/makeplane/plane.git
synced 2026-07-12 21:40:18 +02:00
* dev: custom titlebar for desktop application. * style: update `app-container` css position. * style: update border padding.
13 lines
516 B
TypeScript
13 lines
516 B
TypeScript
import { useContext } from "react";
|
|
// todesktop
|
|
import { isDesktopApp } from "@todesktop/client-core/platform/todesktop";
|
|
// context
|
|
import { DesktopAppContext, TDesktopAppContext } from "./context";
|
|
|
|
export const useDesktopApp = (): TDesktopAppContext => {
|
|
if (!isDesktopApp()) throw new Error("useDesktopApp must be used in desktop app");
|
|
const context = useContext(DesktopAppContext);
|
|
if (context === undefined) throw new Error("useDesktopApp must be used within IssueModalProvider");
|
|
return context;
|
|
};
|