Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
edc3d33
[utils] Port `useLocalStorageState` hook from Toolpad (#41096)
Janpot Feb 21, 2024
babbcf8
Fix useStorageState regressions
Janpot Feb 21, 2024
3111b22
Update useLocalStorageState.ts
Janpot Feb 21, 2024
d5c5b00
Update ThemeModeToggle.tsx
Janpot Feb 21, 2024
ee0901e
Update ThemeModeToggle.tsx
Janpot Feb 21, 2024
977f7ed
Update useLocalStorageState.ts
Janpot Feb 21, 2024
ac7599c
Update useLocalStorageState.ts
Janpot Feb 21, 2024
4038038
Update useLocalStorageState.ts
Janpot Feb 21, 2024
0f37e1f
Update useLocalStorageState.ts
Janpot Feb 21, 2024
ebdf2bc
convention; no blank space here
oliviertassinari Feb 24, 2024
39ef9ba
convention
oliviertassinari Feb 24, 2024
4bfc8f6
need to return null for the first render as we migh need special hand…
oliviertassinari Feb 24, 2024
6041a93
simplify the logic
oliviertassinari Feb 24, 2024
c22dc5c
add no-ssr
oliviertassinari Feb 24, 2024
f234945
early exit for duplicated work
oliviertassinari Feb 24, 2024
6e58a21
fix lousy code hygiene
oliviertassinari Feb 24, 2024
9f9ddc3
omg really
oliviertassinari Feb 24, 2024
d49bc1d
remove console logs
oliviertassinari Feb 24, 2024
3f94ebf
group related logic
oliviertassinari Feb 24, 2024
b6c1a28
leave comments to make sure future iteration will take steps toward t…
oliviertassinari Feb 24, 2024
c209835
good to go
oliviertassinari Feb 24, 2024
6c9b1e9
fix ci
oliviertassinari Feb 24, 2024
a1a54fd
Merge branch 'heads/upstream/master' into storageRegs
Janpot Feb 27, 2024
c363951
Merge branch 'heads/upstream/master' into storageRegs
Janpot Mar 12, 2024
dd935db
Fix types
Janpot Mar 12, 2024
cd4e274
update
Janpot Mar 12, 2024
371978b
Update comment
Janpot Mar 12, 2024
e217b3d
Update useLocalStorageState.ts
Janpot Mar 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update useLocalStorageState.ts
  • Loading branch information
Janpot authored and oliviertassinari committed Feb 25, 2024
commit ac7599c22f5f1bd56f813d0e5beb21ca43a4768c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ function useLocalStorageStateBrowser(
return [storedValue, setStoredValue];
}

export default typeof window === 'undefined' || !window.localStorage
export default typeof window === 'undefined'
? useLocalStorageStateServer
: useLocalStorageStateBrowser;