Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
feat/create-redirection-to-v2 (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdilouraoui authored Nov 14, 2023
1 parent e4b4ac5 commit f07aa37
Show file tree
Hide file tree
Showing 17 changed files with 291 additions and 600 deletions.
2 changes: 0 additions & 2 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ require("ts-node").register({
target: "es2017",
},
});

// Import typescript files below
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"axios": "^0.21.4",
"date-fns": "^2.24.0",
"deepmerge": "^4.2.2",
"gatsby": "^3.14.5",
"gatsby": "^3.9.0",
"gatsby-image": "^3.11.0",
"gatsby-plugin-material-ui": "^3",
"gatsby-plugin-matomo": "^0.10.0",
Expand Down
8 changes: 8 additions & 0 deletions src/hooks/useRedirect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { navigate } from "gatsby";
import { useEffect } from "react";

export const useRedirect = (location: string) => {
useEffect(() => {
navigate(`https://archifiltre.fr${location}`);
}, [location]);
};
12 changes: 8 additions & 4 deletions src/pages/co-construction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import React, { FC } from "react";

import SEO from "../components/seo";
import ThemeImage from "../components/theme-image";
import { useRedirect } from "../hooks/useRedirect";
import Layout from "../layout";

const useStyles = makeStyles((theme: Theme) => ({
Expand Down Expand Up @@ -53,6 +54,9 @@ type CoConstructionProps = {

const CoConstruction: FC<CoConstructionProps> = ({ data }) => {
const classes = useStyles();

useRedirect("/co-creation");

return (
<Layout>
<SEO title="Co-construction" />
Expand All @@ -62,10 +66,10 @@ const CoConstruction: FC<CoConstructionProps> = ({ data }) => {
</Typography>
</Box>
<Box pb={5}>
Les logiciels de la suite Archifiltre sont des produits développés en amélioration
continue. Les choix de développement sont basés sur les retours et
besoins formulés par les utilisateur·trice·s lors des openlabs ou auprès
des ambassadeur·drice·s Archifiltre.
Les logiciels de la suite Archifiltre sont des produits développés en
amélioration continue. Les choix de développement sont basés sur les
retours et besoins formulés par les utilisateur·trice·s lors des
openlabs ou auprès des ambassadeur·drice·s Archifiltre.
</Box>
<Box pb={4} textAlign="center">
<Typography variant="h5">Participez aux openlabs</Typography>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import React, { FC } from "react";

import SEO from "../components/seo";
import { faqData } from "../display-data/faq-data";
import { useRedirect } from "../hooks/useRedirect";
import Layout from "../layout";

const FAQ: FC = () => {
useRedirect("/faq");
return (
<Layout>
<SEO title="FAQ" />
Expand Down
2 changes: 2 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import HomepageTweets from "../components/homepage-tweets";
import Presentation from "../components/presentation";
import ProductFeatures from "../components/product-features";
import SEO from "../components/seo";
import { useRedirect } from "../hooks/useRedirect";
import Layout from "../layout";

const useStyles = makeStyles((theme: Theme) => ({
Expand All @@ -25,6 +26,7 @@ const useStyles = makeStyles((theme: Theme) => ({

const IndexPage: FC = () => {
const classes = useStyles();
useRedirect("/");

return (
<Layout>
Expand Down
41 changes: 0 additions & 41 deletions src/pages/mentions-legales.mdx

This file was deleted.

17 changes: 17 additions & 0 deletions src/pages/mentions-legales.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";

import SEO from "../components/seo";
import { useRedirect } from "../hooks/useRedirect";

React;

const MentionsLegales = () => {
useRedirect("/mentions-legales");
return (
<>
<SEO title="Mentions légales" />;
</>
);
};

export default MentionsLegales;
128 changes: 0 additions & 128 deletions src/pages/politique-de-confidentialite.mdx

This file was deleted.

17 changes: 17 additions & 0 deletions src/pages/politique-de-confidentialite.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";

import SEO from "../components/seo";
import { useRedirect } from "../hooks/useRedirect";

React;

const Politiques = () => {
useRedirect("/politiques-de-confidentialite");
return (
<>
<SEO title="Politiques de confidentialité" />;
</>
);
};

export default Politiques;
Loading

0 comments on commit f07aa37

Please sign in to comment.