diff --git a/.gitea/workflow/deploy.yaml b/.gitea/workflow/deploy.yaml
deleted file mode 100644
index 9e4b884..0000000
--- a/.gitea/workflow/deploy.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: Deploy Fefan
-on:
- push:
- branches:
- - main
- workflow_dispatch:
-jobs:
- deploy:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Build & deploy
- run: |
- git pull
- docker compose up -d --build
\ No newline at end of file
diff --git a/next/api/index.js b/next/api/index.js
index 0f56f1f..c16d4a1 100644
--- a/next/api/index.js
+++ b/next/api/index.js
@@ -1,16 +1,17 @@
-import qs from "qs";
+import qs from 'qs';
async function getData(path, query) {
const queryString = qs.stringify(query);
- const isServerSide = typeof window === "undefined";
+ const isServerSide = typeof window === 'undefined';
const res = await fetch(
`${
isServerSide
- ? process.env.NEXT_PRIVATE_CONTENT_URI ??
- "http://fefan-backend:1337/api"
- : process.env.NEXT_PUBLIC_CONTENT_URI ?? "https://content.fefan.fr/api"
+ ? (process.env.NEXT_PRIVATE_CONTENT_URI ??
+ 'http://fefan-backend:1337/api')
+ : (process.env.NEXT_PUBLIC_CONTENT_URI ??
+ 'https://content.fefan.fr/api')
}/${path}?${queryString}`,
- { cache: "no-store" }
+ { cache: 'no-store' },
);
return await res.json();
diff --git a/next/app/contact/page.js b/next/app/contact/page.js
index b5d681f..7ed84bd 100644
--- a/next/app/contact/page.js
+++ b/next/app/contact/page.js
@@ -1,23 +1,22 @@
-import getData from "@/api";
-import { BlocksRenderer } from "@strapi/blocks-react-renderer";
-import styles from "./style.module.scss";
-import Email from "@/components/email";
-export const dynamic = "force-dynamic";
+import getData from '@/api';
+import BlockRenderer from '@/components/blockRenderer';
+import Email from '@/components/email';
+import styles from './style.module.scss';
+export const dynamic = 'force-dynamic';
export async function generateMetadata() {
return {
metadataBase: `${process.env.NEXT_PUBLIC_ORIGIN}`,
- title: "Contactez nous !",
+ title: 'Contactez nous !',
};
}
export default async function Contact() {
- const site = await getData("site", {});
-
+ const site = await getData('site', {});
const content = site.data?.attributes.contact_text;
return (
- {content ? : null}
+ {content ? : null}
{site.data?.attributes.contact_mail ? : null}
);
diff --git a/next/app/legal/page.js b/next/app/legal/page.js
index b8b071f..df8364c 100644
--- a/next/app/legal/page.js
+++ b/next/app/legal/page.js
@@ -1,22 +1,22 @@
-import getData from "@/api";
-import { BlocksRenderer } from "@strapi/blocks-react-renderer";
-import styles from "./style.module.scss";
-export const dynamic = "force-dynamic";
+import getData from '@/api';
+import BlockRenderer from '@/components/blockRenderer';
+import styles from './style.module.scss';
+export const dynamic = 'force-dynamic';
export async function generateMetadata() {
return {
metadataBase: `${process.env.NEXT_PUBLIC_ORIGIN}`,
- title: "Mentions légales",
+ title: 'Mentions légales',
};
}
export default async function Legal() {
- const site = await getData("site", {});
+ const site = await getData('site', {});
const content = site.data?.attributes.legal;
return (
- {content ? : null}
+ {content ? : null}
);
}
diff --git a/next/app/page.js b/next/app/page.js
index 79e61e8..baa8834 100644
--- a/next/app/page.js
+++ b/next/app/page.js
@@ -1,31 +1,31 @@
-import getData from "@/api";
-import styles from "./page.module.scss";
-import { BlocksRenderer } from "@strapi/blocks-react-renderer";
-import Button from "@/components/button";
-import ImageBlock from "@/components/imageBlock";
-export const dynamic = "force-dynamic";
+import getData from '@/api';
+import BlockRenderer from '@/components/blockRenderer';
+import Button from '@/components/button';
+import ImageBlock from '@/components/imageBlock';
+import styles from './page.module.scss';
+export const dynamic = 'force-dynamic';
export async function generateMetadata() {
- const site = await getData("site", {
+ const site = await getData('site', {
populate: {
edition: {
populate: {
flyer: {
fields: [
- "name",
- "url",
- "alternativeText",
- "caption",
- "width",
- "height",
+ 'name',
+ 'url',
+ 'alternativeText',
+ 'caption',
+ 'width',
+ 'height',
],
},
programs: true,
},
- fields: ["id", "introduction", "title", "subtitle", "description"],
+ fields: ['id', 'introduction', 'title', 'subtitle', 'description'],
},
},
- fields: ["author"],
+ fields: ['author'],
});
const current_edition = site.data?.attributes.edition.data?.attributes;
const flyer =
@@ -37,7 +37,7 @@ export async function generateMetadata() {
title: current_edition.title,
description: current_edition.description,
alternates: {
- canonical: "/",
+ canonical: '/',
},
openGraph: {
title: current_edition.title,
@@ -49,25 +49,25 @@ export async function generateMetadata() {
height: flyer.height,
},
authors: [site.data.attributes.author],
- type: "website",
- locale: "fr_FR",
- siteName: "Le Fefan - Festival de Fanfares",
+ type: 'website',
+ locale: 'fr_FR',
+ siteName: 'Le Fefan - Festival de Fanfares',
},
}
: {};
}
export default async function Home() {
- const site = await getData("site", {
+ const site = await getData('site', {
populate: {
edition: {
populate: {
flyer: {
- fields: ["name", "url", "alternativeText", "caption"],
+ fields: ['name', 'url', 'alternativeText', 'caption'],
},
programs: true,
},
- fields: ["id", "introduction", "title", "subtitle"],
+ fields: ['id', 'introduction', 'title', 'subtitle'],
},
},
});
@@ -91,15 +91,15 @@ export default async function Home() {
{current_edition.title}
{current_edition.subtitle}
- {introduction ? : null}
+ {introduction ? : null}