Moved to ReactJS
This commit is contained in:
parent
c8ef2b248f
commit
1d0ebeb2b7
100 changed files with 1909 additions and 6056 deletions
|
|
@ -13,10 +13,8 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@tensamin/ttp": "git+https://github.com/Tensamin/TTP.git",
|
||||
"@solidjs/router": "^0.15.4",
|
||||
"lucide-solid": "^0.564.0",
|
||||
"solid-js": "^1.9.11",
|
||||
"solid-sonner": "^0.2.8",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"zod": "^4.3.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import { createContext, useContext } from "solid-js";
|
||||
import type { ParentProps } from "solid-js";
|
||||
import * as React from "react";
|
||||
|
||||
export const context = createContext<contextType>();
|
||||
export const context = React.createContext<contextType | undefined>(undefined);
|
||||
|
||||
export default function Provider(props: ParentProps) {
|
||||
export default function Provider(props: { children: React.ReactNode }) {
|
||||
// live_messages
|
||||
|
||||
return (
|
||||
|
|
@ -18,7 +17,7 @@ type contextType = {
|
|||
};
|
||||
|
||||
export function useNotifications(): contextType {
|
||||
const ctx = useContext(context);
|
||||
const ctx = React.useContext(context);
|
||||
if (!ctx) {
|
||||
throw new Error("useNotifications must be used within a ChatProvider");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"jsx": "preserve",
|
||||
"jsxImportSource": "solid-js",
|
||||
"jsx": "react-jsx",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"noEmit": true
|
||||
|
|
|
|||
Loading…
Reference in a new issue