mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 13:53:45 +02:00
Avoid unnecessary re-renders when working with HMR
This commit is contained in:
@@ -47,9 +47,7 @@ export default () => {
|
||||
return { name: directory, path: `/${dirs.slice(0, index + 1).join('/')}` };
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
load();
|
||||
}, [ window.location.hash ]);
|
||||
useEffect(() => load(), []);
|
||||
|
||||
return (
|
||||
<div className={'my-10 mb-6'}>
|
||||
|
||||
Reference in New Issue
Block a user