mirror of
https://github.com/ente-io/ente.git
synced 2025-08-07 15:09:09 +00:00
tsc
This commit is contained in:
parent
491f38b120
commit
823f739c32
@ -1,11 +1,10 @@
|
||||
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
|
||||
import type { Dispatch, SetStateAction } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export function useLocalState<T>(
|
||||
key: LS_KEYS,
|
||||
initialValue?: T,
|
||||
): [T, Dispatch<SetStateAction<T>>] {
|
||||
initialValue: T,
|
||||
): [T, (newValue: T) => void] {
|
||||
const [value, setValue] = useState<T>(initialValue);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user