Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Fix empty related media header #1941

Merged
merged 1 commit into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/pages/image/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@
:image-height="imageHeight"
:image-type="imageType"
/>
<VRelatedImages :media="relatedMedia" :fetch-state="relatedFetchState" />
<VRelatedImages
v-if="hasRelatedMedia"
:media="relatedMedia"
:fetch-state="relatedFetchState"
/>
</div>
</template>

Expand Down Expand Up @@ -136,6 +140,7 @@ export default defineComponent({
)

const backToSearchPath = computed(() => route.value.meta?.backToSearchPath)
const hasRelatedMedia = computed(() => relatedMediaStore.media.length > 0)
const relatedMedia = computed(() => relatedMediaStore.media)
const relatedFetchState = computed(() => relatedMediaStore.fetchState)

Expand Down Expand Up @@ -207,6 +212,7 @@ export default defineComponent({
}
return {
image,
hasRelatedMedia,
relatedMedia,
relatedFetchState,
imageWidth,
Expand Down