mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-26 03:25:56 +00:00
fix(nav): a module's page is hidden when the module is not on the server at all
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1181b920d3
commit
375be1b2c5
1 file changed
+1
-1
@@ -51,7 +51,7 @@ export function Shell(props: {
|
|||||||
const reloadModules = useCallback(() => {
|
const reloadModules = useCallback(() => {
|
||||||
void api
|
void api
|
||||||
.modulesList(props.activeId)
|
.modulesList(props.activeId)
|
||||||
.then((list) => setHiddenPages(list.filter((m) => m.page && m.installed && m.switchable && !m.enabled).map((m) => m.page as string)))
|
.then((list) => setHiddenPages(list.filter((m) => m.page && (!m.installed || (m.switchable && !m.enabled))).map((m) => m.page as string)))
|
||||||
.catch(() => setHiddenPages([]));
|
.catch(() => setHiddenPages([]));
|
||||||
}, [props.activeId]);
|
}, [props.activeId]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in new issue
Block a user