Skip to content
Snippets Groups Projects
Commit 5bf97039 authored by Simon Künzel's avatar Simon Künzel
Browse files

Store edit mode enabled in local storage

parent 2a2f98f9
Branches
Tags v2.0.8
No related merge requests found
Pipeline #7863 failed
import type React from "react";
import { createContext, useContext, useEffect, useRef, useState } from "react";
import { createContext, useContext, useEffect, useRef } from "react";
import { useLocalStorageState } from "@/miscellaneous";
const EditModeContext = createContext({
editMode: false,
......@@ -9,7 +11,7 @@ const EditModeContext = createContext({
});
export function EditModeProvider({ children }: { children: React.ReactNode }) {
const [editMode, setEditMode] = useState(false);
const [editMode, setEditMode] = useLocalStorageState("editModeEnabled", false);
const lockCount = useRef(0);
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment