Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
videoag
frontend
Commits
5bf97039
Commit
5bf97039
authored
2 months ago
by
Simon Künzel
Browse files
Options
Downloads
Patches
Plain Diff
Store edit mode enabled in local storage
parent
2a2f98f9
Branches
Branches containing commit
Tags
v2.0.8
No related merge requests found
Pipeline
#7863
failed
2 months ago
Stage: test
Stage: deploy
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/videoag/object_management/EditModeProvider.tsx
+4
-2
4 additions, 2 deletions
src/videoag/object_management/EditModeProvider.tsx
with
4 additions
and
2 deletions
src/videoag/object_management/EditModeProvider.tsx
+
4
−
2
View file @
5bf97039
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
]
=
use
State
(
false
);
const
[
editMode
,
setEditMode
]
=
use
LocalStorageState
(
"
editModeEnabled
"
,
false
);
const
lockCount
=
useRef
(
0
);
return
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment