change host

master
gman 2 years ago
parent d5f8e46d00
commit aa6bb5a51a

@ -2,7 +2,7 @@ import { Box } from '@mantine/core';
import {
createBrowserRouter,
RouterProvider,
useLoaderData,
// useLoaderData,
} from 'react-router-dom';
import { KartaPage } from './KartaPage';
@ -14,12 +14,6 @@ import headerLinks from './assets/header.json';
import footerLinks from './assets/footer.json';
const articleLoader = async function({ params }) {
const response = await fetch("http://strapi.wg.gateway.ts/api/articles?filters[id][$eq]=3")
const article = await response.json()
return article;
}
const router = createBrowserRouter([
{
path: "/",
@ -33,7 +27,7 @@ const router = createBrowserRouter([
path: "/article/:id",
element: <Article />,
loader: async ({ params }) => {
return fetch(`http://strapi.wg.gateway.ts/api/articles?populate=*&filters[id][$eq]=${params.id}`);
return fetch(`https://strapi.iamonlyherefortheicecream.gq/api/articles?populate=*&filters[id][$eq]=${params.id}`);
},
}
])

@ -38,7 +38,7 @@ export function Article() {
if (articleData.data[0].attributes.carousel.data) {
return (
<Carousel slideSize="70%" height={500} slideGap="md" loop>
{articleData.data[0].attributes.carousel.data.map(image => <Carousel.Slide><Image fit='fill' height={500} mx="auto" radius="md" src={`http://strapi.wg.gateway.ts${image.attributes.url}`} alt="Random image" /></Carousel.Slide>)}
{articleData.data[0].attributes.carousel.data.map(image => <Carousel.Slide><Image fit='fill' height={500} mx="auto" radius="md" src={`https://strapi.iamonlyherefortheicecream.gq${image.attributes.url}`} alt="Random image" /></Carousel.Slide>)}
</Carousel>
)
}

Loading…
Cancel
Save