mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
add eslint-plugin-prettier
This commit is contained in:
parent
0e4d2bf44d
commit
ba0604ab9d
69 changed files with 419 additions and 249 deletions
|
@ -1,6 +1,9 @@
|
|||
import { useEffect, useMemo, useState } from 'react';
|
||||
|
||||
export const usePersistedState = (key: string, initial: string): [string, (val: string) => any] => {
|
||||
export const usePersistedState = (
|
||||
key: string,
|
||||
initial: string,
|
||||
): [string, (val: string) => any] => {
|
||||
const stored = useMemo(() => {
|
||||
try {
|
||||
return localStorage.getItem(`vault_${key}`) || initial;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue