From a92c696687fe25133d5de61a9798645846c747dc Mon Sep 17 00:00:00 2001 From: lifeparticle Date: Wed, 27 Sep 2023 00:11:57 +1000 Subject: [PATCH] refactor --- .../Hoc/withPageTitle/withPageTitle.tsx | 7 ++++++- ui/src/components/Layouts/Footer/index.tsx | 16 +++++++++------- .../Footer/CookiePolicy/CookiePolicy.module.scss | 2 +- ui/src/pages/Footer/CookiePolicy/index.tsx | 10 +++++----- ui/src/pages/Home/components/Contribution.tsx | 4 +++- ui/src/pages/Home/components/Features.tsx | 9 ++++++--- ui/src/pages/Routes/utils/constant.tsx | 2 +- 7 files changed, 31 insertions(+), 19 deletions(-) diff --git a/ui/src/components/Hoc/withPageTitle/withPageTitle.tsx b/ui/src/components/Hoc/withPageTitle/withPageTitle.tsx index 656ed05d..ec4ed894 100644 --- a/ui/src/components/Hoc/withPageTitle/withPageTitle.tsx +++ b/ui/src/components/Hoc/withPageTitle/withPageTitle.tsx @@ -9,9 +9,14 @@ const NO_PADDING = [ "BinaryTree: Developer Productivity Tools", "About", "Terms", + "Cookie Policy", ]; -const NO_TITLE = ["BinaryTree: Developer Productivity Tools", "Terms"]; +const NO_TITLE = [ + "BinaryTree: Developer Productivity Tools", + "Terms", + "Cookie Policy", +]; const withPageTitle = ( WrappedComponent: React.ComponentType diff --git a/ui/src/components/Layouts/Footer/index.tsx b/ui/src/components/Layouts/Footer/index.tsx index c87fde26..28bfbde9 100644 --- a/ui/src/components/Layouts/Footer/index.tsx +++ b/ui/src/components/Layouts/Footer/index.tsx @@ -113,18 +113,20 @@ const Footer: React.FC = () => { Legal diff --git a/ui/src/pages/Footer/CookiePolicy/CookiePolicy.module.scss b/ui/src/pages/Footer/CookiePolicy/CookiePolicy.module.scss index d923e594..e5c39eb4 100644 --- a/ui/src/pages/Footer/CookiePolicy/CookiePolicy.module.scss +++ b/ui/src/pages/Footer/CookiePolicy/CookiePolicy.module.scss @@ -1,4 +1,4 @@ -.privacypolicy { +.cookiepolicy { padding: 64px 10% 64px 10%; display: flex; diff --git a/ui/src/pages/Footer/CookiePolicy/index.tsx b/ui/src/pages/Footer/CookiePolicy/index.tsx index b32a6efa..7eeb1e27 100644 --- a/ui/src/pages/Footer/CookiePolicy/index.tsx +++ b/ui/src/pages/Footer/CookiePolicy/index.tsx @@ -3,12 +3,12 @@ import Footer from "components/Layouts/Footer"; import style from "./CookiePolicy.module.scss"; import { TABLE_COLUMNS, TABLE_DATA } from "./utils/constants"; -const PrivacyPolicy = () => { +const CookiePolicy = () => { return ( <> - -
- COOKIE POLICY + +
+ Cookie Policy
This Cookie Policy explains how BinaryTree @@ -217,4 +217,4 @@ const PrivacyPolicy = () => { ); }; -export default PrivacyPolicy; +export default CookiePolicy; diff --git a/ui/src/pages/Home/components/Contribution.tsx b/ui/src/pages/Home/components/Contribution.tsx index dadf68fe..517bf6d0 100644 --- a/ui/src/pages/Home/components/Contribution.tsx +++ b/ui/src/pages/Home/components/Contribution.tsx @@ -10,7 +10,9 @@ const Contribution: React.FC = () => { return (
- Join our community + + Join our community + Join our open-source community and help shape the future of Modern web diff --git a/ui/src/pages/Home/components/Features.tsx b/ui/src/pages/Home/components/Features.tsx index 25357cad..2da11a55 100644 --- a/ui/src/pages/Home/components/Features.tsx +++ b/ui/src/pages/Home/components/Features.tsx @@ -3,13 +3,16 @@ import { Button, Card, Col, Row, Space, Typography } from "antd"; import Icon from "components/General/Icon"; import { FEATURES } from "pages/Home/utils/constants"; import style from "pages/Home/Home.module.scss"; -import { openLink } from "lib/utils/helper"; +import { useNavigate } from "react-router-dom"; + const Features: React.FC = () => { + const navigate = useNavigate(); + return ( - + BinaryTree comes packed with some awesome features @@ -27,7 +30,7 @@ const Features: React.FC = () => { {FEATURES.map((feature) => ( openLink(feature.link, false)} + onClick={() => navigate(feature.link)} hoverable > diff --git a/ui/src/pages/Routes/utils/constant.tsx b/ui/src/pages/Routes/utils/constant.tsx index 1b25735e..176453d6 100644 --- a/ui/src/pages/Routes/utils/constant.tsx +++ b/ui/src/pages/Routes/utils/constant.tsx @@ -340,7 +340,7 @@ export const routes: Route[] = [ { id: "cookiepolicy", path: "/cookie-policy", - title: "", + title: "Cookie Policy", description: "", component: CookiePolicy, },