From eb5fa9b70163c69a0f94cf4c2e4c29b85ed27f66 Mon Sep 17 00:00:00 2001 From: fsoussand Date: Thu, 22 Jun 2023 09:21:38 +0200 Subject: [PATCH] create generic link component --- public/product_assets/images/white-arrow.svg | 4 +++ src/components/ui/Buttons/AppLink.tsx | 37 ++++++++++++++++++++ src/pages/index.tsx | 10 ++---- 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 public/product_assets/images/white-arrow.svg create mode 100644 src/components/ui/Buttons/AppLink.tsx diff --git a/public/product_assets/images/white-arrow.svg b/public/product_assets/images/white-arrow.svg new file mode 100644 index 0000000..6a428f8 --- /dev/null +++ b/public/product_assets/images/white-arrow.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/ui/Buttons/AppLink.tsx b/src/components/ui/Buttons/AppLink.tsx new file mode 100644 index 0000000..4f8c12b --- /dev/null +++ b/src/components/ui/Buttons/AppLink.tsx @@ -0,0 +1,37 @@ +import { Link } from "@mui/material"; +import Image from "next/image"; + +interface IAppLink { + text: string; + link: string; +} + +const AppLink: React.FC = ({ text, link }) => { + return ( + + {text} + + + ); +}; + +export default AppLink; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index e535610..9633556 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,4 @@ -import { Stack, Container, Fab, Link, List, Paper } from "@mui/material"; +import { Stack, Container, List, Paper } from "@mui/material"; import { Box } from "@mui/system"; import { useAtom } from "jotai"; import type { NextPage } from "next"; @@ -6,6 +6,7 @@ import Image from "next/image"; import { useEffect } from "react"; import AppBar from "components/ui/AppBar/AppBar"; +import AppLink from "src/components/ui/Buttons/AppLink"; import { cartAtom } from "src/store/cart"; const Home: NextPage = () => { @@ -54,12 +55,7 @@ const Home: NextPage = () => { - - - - Je démarre mes courses - - +