Moved to ReactJS
This commit is contained in:
parent
c8ef2b248f
commit
1d0ebeb2b7
100 changed files with 1909 additions and 6056 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue