Skip to content

Commit

Permalink
fix: remove old code and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericNumericite committed Jan 10, 2024
1 parent 717dd69 commit abdbc3b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 51 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ yarn start

Développer une application visant à augmenter les connaissances et compétences des jeunes en matière de santé sexuelle. Contient des informations sur la sexualité, des quizzs et possibilité de commander des kits.

Créer un fichier .env avec les informations du .env.example du repo
Créer un fichier .env et un fichier .env.example. Récupérer les informations des fichiers env du dossier environnements.

```bash
npm start
Expand Down
50 changes: 0 additions & 50 deletions tumeplay-vitrine/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,54 +237,4 @@ const Home = () => {
);
};

export async function getServerSideProps() {
const NEXT_PUBLIC_STRAPI_URL = process.env.NEXT_PUBLIC_STRAPI_URL as string;
let response = await axios.get(`${NEXT_PUBLIC_STRAPI_URL}/contents`, {
params: {
_start: 0,
_limit: 15,
title_mobile_null: false,
thematique_mobile_null: false,
},
});
const posts = (response.data || []).map((c: Post) => ({
...c,
image: {
...c.image,
url: NEXT_PUBLIC_STRAPI_URL + c.image?.formats?.thumbnail?.url,
},
thematique_mobile: {
...c.thematique_mobile,
image: {
...c.thematique_mobile.image,
url: NEXT_PUBLIC_STRAPI_URL + c.thematique_mobile.image.url,
},
},
etiquette: {
...c.etiquette,
image: {
...c.etiquette?.image,
url:
NEXT_PUBLIC_STRAPI_URL + c.etiquette?.image.formats?.thumbnail?.url,
},
},
}));

response = await axios.get(`${NEXT_PUBLIC_STRAPI_URL}/thematique-mobiles`, {
params: {
_start: 0,
_limit: 100,
},
});
const themes = (response.data || []).map((t: Theme) => ({
...t,
image: {
...t.image,
url: NEXT_PUBLIC_STRAPI_URL + t.image?.url,
},
}));

return { props: {} };
}

export default Home;

0 comments on commit abdbc3b

Please sign in to comment.