Big Updated, added some tests, added comments for all functions, I forgot the rest
This commit is contained in:
parent
d77271e4b7
commit
90a1059cc8
59 changed files with 1816 additions and 203 deletions
|
|
@ -2,6 +2,11 @@ import * as React from "react";
|
|||
|
||||
export const context = React.createContext<contextType | undefined>(undefined);
|
||||
|
||||
/**
|
||||
* Executes Provider.
|
||||
* @param props Parameter props.
|
||||
* @returns unknown.
|
||||
*/
|
||||
export default function Provider(props: { children: React.ReactNode }) {
|
||||
// live_messages
|
||||
|
||||
|
|
@ -16,6 +21,11 @@ type contextType = {
|
|||
test: () => void;
|
||||
};
|
||||
|
||||
/**
|
||||
* Executes useNotifications.
|
||||
* @param none This function has no parameters.
|
||||
* @returns contextType.
|
||||
*/
|
||||
export function useNotifications(): contextType {
|
||||
const ctx = React.useContext(context);
|
||||
if (!ctx) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue