From d531dff8d3f5c60df2e5c08e8bd04bf9a234dbc3 Mon Sep 17 00:00:00 2001
From: Brendan Allan <brendonovich@outlook.com>
Date: Mon, 8 Dec 2025 13:43:36 +0800
Subject: Export DesktopInterface from desktop and add PlatformContext

---
 packages/desktop/src/PlatformContext.tsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 packages/desktop/src/PlatformContext.tsx

(limited to 'packages/desktop/src/PlatformContext.tsx')

diff --git a/packages/desktop/src/PlatformContext.tsx b/packages/desktop/src/PlatformContext.tsx
new file mode 100644
index 000000000..5b510a8d4
--- /dev/null
+++ b/packages/desktop/src/PlatformContext.tsx
@@ -0,0 +1,14 @@
+import { createContext } from "solid-js"
+import { useContext } from "solid-js"
+
+export interface Platform {}
+
+const PlatformContext = createContext<Platform>()
+
+export const PlatformProvider = PlatformContext.Provider
+
+export function usePlatform() {
+  const ctx = useContext(PlatformContext)
+  if (!ctx) throw new Error("usePlatform must be used within a PlatformProvider")
+  return ctx
+}
-- 
cgit v1.2.3

