api url and environment

This commit is contained in:
Julian Krauser 2024-11-05 18:31:12 +01:00
parent 38385d56d9
commit 3e260c0007
10 changed files with 40 additions and 11 deletions

View file

@ -1,5 +1,5 @@
<template>
<div class="relative h-[calc(100vh-6rem)] max-h-[calc(100vh-6rem)] w-full overflow-hidden">
<div class="relative h-[calc(100svh-6rem)] max-h-[calc(100svh-6rem)] w-full overflow-hidden">
<NuxtPicture
loading="lazy"
class="w-full h-full object-cover object-center"
@ -20,7 +20,8 @@ import type Homepage from "../types/single/homepage";
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"));