UX Changes: persist user display choice in localStorage
This commit is contained in:
parent
de7f343f90
commit
c7bf75e259
|
|
@ -43,9 +43,10 @@ const Chatflows = () => {
|
||||||
const [loginDialogProps, setLoginDialogProps] = useState({})
|
const [loginDialogProps, setLoginDialogProps] = useState({})
|
||||||
|
|
||||||
const getAllChatflowsApi = useApi(chatflowsApi.getAllChatflows)
|
const getAllChatflowsApi = useApi(chatflowsApi.getAllChatflows)
|
||||||
const [view, setView] = React.useState('card')
|
const [view, setView] = React.useState(localStorage.getItem('flowDisplayStyle') || 'card')
|
||||||
|
|
||||||
const handleChange = (event, nextView) => {
|
const handleChange = (event, nextView) => {
|
||||||
|
localStorage.setItem('flowDisplayStyle', nextView)
|
||||||
setView(nextView)
|
setView(nextView)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue