This commit is contained in:
Brian McGee
2025-07-31 16:11:04 +01:00
parent 43f9fce359
commit 8f4ff5367f

View File

@@ -18,14 +18,22 @@ export const Machine = (props: RouteSectionProps) => {
const machineName = useMachineName();
const machineQuery = useMachineQuery(clanURI, machineName);
const sectionProps = { clanURI, machineName, machineQuery };
const sidebarPane = (machineName: string) => {
const machineQuery = useMachineQuery(clanURI, machineName);
return (
<Show when={useMachineName()} keyed>
<SidebarPane title={useMachineName()} onClose={onClose}>
const sectionProps = { clanURI, machineName, machineQuery };
return (
<SidebarPane title={machineName} onClose={onClose}>
<SectionGeneral {...sectionProps} />
<SectionTags {...sectionProps} />
</SidebarPane>
);
}
return (
<Show when={useMachineName()} keyed>
{sidebarPane(useMachineName())}
</Show>
);
};