let installed = false;
function notify(message, level = "error") {
document.dispatchEvent(
new CustomEvent("flash:show", { detail: { message, level } })
);
package web
import (
"embed"
"io/fs"
)
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
export const RouterContext = createContext(null);
export function RouterProvider({ children }) {
const [path, setPath] = useState(() => window.location.pathname);