From e850796e713da200688f8d69ddfeaa43cfecff2b Mon Sep 17 00:00:00 2001 From: Elliot Braem <16282460+elliotBraem@users.noreply.github.com> Date: Sat, 4 Mar 2023 19:46:38 -0700 Subject: [PATCH] feature: removes duplicate footer components, add location conditional --- src/App.tsx | 7 ++--- src/component/explore/index.tsx | 9 ++----- src/component/profile/footer.tsx | 21 --------------- src/component/profile/index.tsx | 2 -- src/component/shared/footer/FooterItem.tsx | 31 ++++++++++++++++++++++ src/component/shared/footer/index.tsx | 29 ++++++++++++++++++++ src/routes/index.tsx | 20 +++++++++----- yarn.lock | 22 +++++++-------- 8 files changed, 90 insertions(+), 51 deletions(-) delete mode 100644 src/component/profile/footer.tsx create mode 100644 src/component/shared/footer/FooterItem.tsx create mode 100644 src/component/shared/footer/index.tsx diff --git a/src/App.tsx b/src/App.tsx index ada7fae..1f7a8b7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,9 +1,10 @@ -import React from "react"; -import Login from "component/login"; +import Footer from "component/shared/footer"; +import { Outlet } from "react-router-dom"; function App() { return (
- + +
); } diff --git a/src/component/explore/index.tsx b/src/component/explore/index.tsx index 4617c96..ee5158a 100644 --- a/src/component/explore/index.tsx +++ b/src/component/explore/index.tsx @@ -1,11 +1,9 @@ -import React, { useState } from "react"; import { ReactComponent as ArrowDown } from "assets/icon/arrowdown.svg"; import { ReactComponent as Arrowupright } from "assets/icon/arrowupright.svg"; -import { ReactComponent as Smile } from "assets/icon/smile.svg"; import { ReactComponent as Iconc } from "assets/icon/iconc.svg"; -import Circles from "component/shared/circles"; +import { ReactComponent as Smile } from "assets/icon/smile.svg"; import { InteractionSecondarywhite } from "component/shared/btn"; -import Header from "component/shared/header"; +import Circles from "component/shared/circles"; type Props = {}; function Index({}: Props) { return ( @@ -63,9 +61,6 @@ function Index({}: Props) { -
-
-
diff --git a/src/component/profile/footer.tsx b/src/component/profile/footer.tsx deleted file mode 100644 index 2310651..0000000 --- a/src/component/profile/footer.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react"; -import { ReactComponent as Circle } from "assets/icon/profile/circle.svg"; -import { ReactComponent as Add } from "assets/icon/add.svg"; - -type Props = {}; - -const Footer = (props: Props) => { - return ( -
-
- -
-
- -
-
-
- ); -}; - -export default Footer; diff --git a/src/component/profile/index.tsx b/src/component/profile/index.tsx index 8348f82..cd7b69e 100644 --- a/src/component/profile/index.tsx +++ b/src/component/profile/index.tsx @@ -1,7 +1,6 @@ import React, { useState } from "react"; import { ReactComponent as User } from "assets/icon/profile/user.svg"; import { ReactComponent as Setting } from "assets/icon/profile/setting.svg"; -import Footer from "./footer"; import Invite from "./invite"; import { Info } from "component/create/animations"; import { photos } from "component/explore/photos"; @@ -49,7 +48,6 @@ const Index = (props: Props) => { )}
-