mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
**Refactor imports and improve type annotations**
- Adjusted import statements across the codebase to align with consistent use of `type`. - Unified usage of `EventSource` initialization. - Introduced `RootDeps` type for shared dependencies. - Commented out unused VitePWA configuration. - Updated proxy target URLs in Vite configuration.
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import React, { useContext } from "react";
|
||||
import { useContext, createContext, type ReactNode } from "react";
|
||||
import type { PageContext } from "vike/types";
|
||||
|
||||
export { PageContextProvider };
|
||||
export { usePageContext };
|
||||
|
||||
const Context = React.createContext<PageContext>(undefined as any);
|
||||
const Context = createContext<PageContext>(undefined as any);
|
||||
|
||||
function PageContextProvider({
|
||||
pageContext,
|
||||
children,
|
||||
}: {
|
||||
pageContext: PageContext;
|
||||
children: React.ReactNode;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return <Context.Provider value={pageContext}>{children}</Context.Provider>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user