File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ import {
4646 IconUpload ,
4747 IconUsersGroup ,
4848} from '@tabler/icons-react' ;
49- import { useState } from 'react' ;
49+ import { useEffect , useState } from 'react' ;
5050import ConfigProvider from './ConfigProvider' ;
5151import VersionBadge from './VersionBadge' ;
5252import { Link , useLoaderData } from 'react-router-dom' ;
@@ -167,6 +167,12 @@ export default function Layout() {
167167 const { user, mutate } = useLogin ( ) ;
168168 const { avatar } = useAvatar ( ) ;
169169
170+ const [ prev , setPrev ] = useState ( location . pathname ) ;
171+ if ( prev !== location . pathname ) {
172+ setPrev ( location . pathname ) ;
173+ setOpened ( false ) ;
174+ }
175+
170176 const copyToken = ( ) => {
171177 modals . openConfirmModal ( {
172178 title : 'Copy token?' ,
@@ -241,6 +247,7 @@ export default function Layout() {
241247 color = { theme . colors . gray [ 6 ] }
242248 mr = 'xl'
243249 hiddenFrom = 'sm'
250+ bdrs = 'md'
244251 />
245252
246253 { config . website . titleLogo && (
You can’t perform that action at this time.
0 commit comments