api url and environment
This commit is contained in:
parent
38385d56d9
commit
3e260c0007
10 changed files with 40 additions and 11 deletions
|
@ -50,7 +50,8 @@ import type Operation from "../types/collection/operation";
|
|||
import type Event from "../types/collection/event";
|
||||
import type Vehicle from "../types/collection/vehicle";
|
||||
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
|
||||
defineProps({
|
||||
data: Object as PropType<Article | Operation | Event | Vehicle>,
|
||||
|
|
|
@ -66,7 +66,8 @@ import type Global from "../types/single/global";
|
|||
const {
|
||||
params: { slug: params },
|
||||
} = useRoute();
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
const { findOne } = useStrapi();
|
||||
|
||||
const { data: global } = await useAsyncData("global", () => findOne<Global>("global"));
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
import type { PropType } from "vue";
|
||||
import type BaseCollection from "~/types/collection/baseCollection";
|
||||
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
|
||||
defineProps({
|
||||
data: Object as PropType<BaseCollection>,
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
import type { PropType } from "vue";
|
||||
import type DynamicZoneColumnImageText from "../../types/component/dynamicZoneColumnImageText";
|
||||
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
|
||||
defineProps({
|
||||
data: Object as PropType<DynamicZoneColumnImageText>,
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
import type { PropType } from "vue";
|
||||
import type DynamicZoneFullImage from "../../types/component/dynamicZoneFullImage";
|
||||
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
|
||||
defineProps({
|
||||
data: Object as PropType<DynamicZoneFullImage>,
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
import type { PropType } from "vue";
|
||||
import type DynamicZoneGallery from "../../types/component/dynamicZoneGallery";
|
||||
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
|
||||
defineProps({
|
||||
data: Object as PropType<DynamicZoneGallery>,
|
||||
|
|
|
@ -20,5 +20,6 @@ defineProps({
|
|||
data: Object as PropType<SharedHero>,
|
||||
});
|
||||
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
</script>
|
||||
|
|
|
@ -32,7 +32,10 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="data?.lookup.date_list" class="flex flex-row w-full justify-between items-center select-none pt-4">
|
||||
<div
|
||||
v-if="data?.lookup.date_list"
|
||||
class="flex flex-row w-full max-w-4xl mx-auto justify-between items-center select-none pt-4"
|
||||
>
|
||||
<p class="text-sm font-normal text-gray-500">
|
||||
Elemente <span class="font-semibold text-gray-900">{{ showingText }}</span> von
|
||||
<span class="font-semibold text-gray-900">{{ entryCount }}</span>
|
||||
|
@ -87,7 +90,8 @@ interface Meta {
|
|||
total: number;
|
||||
}
|
||||
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
const { find } = useStrapi();
|
||||
|
||||
const props = defineProps({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue