mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-20 07:13:45 +02:00
Fix some SWR funkiness
This commit is contained in:
@@ -28,6 +28,10 @@ export default () => {
|
||||
const setDirectory = ServerContext.useStoreActions(actions => actions.files.setDirectory);
|
||||
|
||||
useEffect(() => {
|
||||
// We won't automatically mutate the store when the component re-mounts, otherwise because of
|
||||
// my (horrible) programming this fires off way more than we intend it to.
|
||||
mutate();
|
||||
|
||||
setDirectory(hash.length > 0 ? hash : '/');
|
||||
}, [ hash ]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user