refactor: don't render unneeded elements on raw info page

This commit is contained in:
Sped0n
2024-02-22 01:48:48 +08:00
parent 1a02360214
commit ecdaebb6cd
2 changed files with 44 additions and 40 deletions

View File

@@ -55,6 +55,7 @@ export default function Desktop(props: {
return ( return (
<> <>
<Nav /> <Nav />
<Show when={props.ijs.length > 0}>
<Stage <Stage
ijs={props.ijs} ijs={props.ijs}
setIsLoading={setIsLoading} setIsLoading={setIsLoading}
@@ -84,6 +85,7 @@ export default function Desktop(props: {
setNavVector={setNavVector} setNavVector={setNavVector}
/> />
</Show> </Show>
</Show>
</> </>
) )
} }

View File

@@ -1,4 +1,4 @@
import { createSignal, type JSX, type Setter } from 'solid-js' import { Show, createSignal, type JSX, type Setter } from 'solid-js'
import type { ImageJSON } from '../resources' import type { ImageJSON } from '../resources'
@@ -29,6 +29,7 @@ export default function Mobile(props: {
return ( return (
<> <>
<Show when={props.ijs.length > 0}>
<Collection <Collection
ijs={props.ijs} ijs={props.ijs}
isAnimating={isAnimating} isAnimating={isAnimating}
@@ -45,6 +46,7 @@ export default function Mobile(props: {
setIsOpen={setIsOpen} setIsOpen={setIsOpen}
setScrollable={props.setScrollable} setScrollable={props.setScrollable}
/> />
</Show>
</> </>
) )
} }