Skip to content

Commit

Permalink
chore: remove few additinoal types
Browse files Browse the repository at this point in the history
  • Loading branch information
patzick committed Jan 30, 2024
1 parent eb77238 commit e09365a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
5 changes: 3 additions & 2 deletions packages/cms-base/components/public/cms/CmsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import {
} from "@shopware-pwa/helpers-next";
import { useListing, useNavigationContext } from "#imports";
import { computed, h, resolveComponent } from "vue";
import type { Schemas } from "#shopware";
const props = defineProps<{
content: CmsPage;
content: CmsPage | Schemas["CmsPage"];
}>();
const { routeName } = useNavigationContext();
Expand All @@ -18,7 +19,7 @@ if (routeName.value === "frontend.navigation.page") {
}
const cmsSections = computed<CmsSection[]>(() => {
return props.content?.sections || [];
return (props.content?.sections as unknown as CmsSection[]) || [];
});
const DynamicRender = () => {
Expand Down
3 changes: 1 addition & 2 deletions templates/vue-demo-store/components/FrontendDetailPage.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import { useProductSearch } from "#imports";
import { getCategoryBreadcrumbs } from "@shopware-pwa/helpers-next";
import type { CmsPage } from "@shopware-pwa/types";
const props = defineProps<{
navigationId: string;
Expand Down Expand Up @@ -45,7 +44,7 @@ useCmsHead(product, { mainShopTitle: "Shopware Frontends Demo Store" });
<ProductStatic :product="product" />
</template>
<template v-else-if="product.cmsPage">
<CmsPage :content="product.cmsPage as unknown as CmsPage" />
<CmsPage :content="product.cmsPage" />
</template>
</div>
</template>
6 changes: 1 addition & 5 deletions templates/vue-demo-store/components/FrontendLandingPage.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import { useLandingSearch } from "#imports";
import type { Schemas } from "#shopware";
import type { CmsPage } from "@shopware-pwa/types";
const props = defineProps<{
navigationId: string;
Expand All @@ -27,8 +26,5 @@ if (typeof landingResponse?.value !== null) {

<template>
<LayoutBreadcrumbs />
<CmsPage
v-if="landingResponse?.cmsPage"
:content="landingResponse.cmsPage as unknown as CmsPage"
/>
<CmsPage v-if="landingResponse?.cmsPage" :content="landingResponse.cmsPage" />
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { Ref } from "vue";
import { getCategoryBreadcrumbs } from "@shopware-pwa/helpers-next";
import { useCmsHead } from "@/composables/useCmsHead";
import type { Schemas } from "#shopware";
import type { CmsPage } from "@shopware-pwa/types";
const props = defineProps<{
navigationId: string;
Expand Down Expand Up @@ -38,8 +37,5 @@ useCmsHead(category, { mainShopTitle: "Shopware Frontends Demo Store" });

<template>
<LayoutBreadcrumbs v-if="route.path != '/'" />
<CmsPage
v-if="category?.cmsPage"
:content="category.cmsPage as unknown as CmsPage"
/>
<CmsPage v-if="category?.cmsPage" :content="category.cmsPage" />
</template>

0 comments on commit e09365a

Please sign in to comment.