Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeparticle committed Sep 26, 2023
1 parent cc5fe5b commit a92c696
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 19 deletions.
7 changes: 6 additions & 1 deletion ui/src/components/Hoc/withPageTitle/withPageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <T extends object>(
WrappedComponent: React.ComponentType<T>
Expand Down
16 changes: 9 additions & 7 deletions ui/src/components/Layouts/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,20 @@ const Footer: React.FC = () => {
<Typography.Title level={4}>Legal</Typography.Title>
<ul className={style.footer__list}>
<li>
<a onClick={() => openLink("/terms", false)}>Terms</a>
<Link to={"/terms"}>
<a>Terms</a>
</Link>
</li>
<li>
<a onClick={() => openLink("/privacy", false)}>
Privacy
</a>
<Link to={"/privacy"}>
<a>Privacy</a>
</Link>
</li>

<li>
<a onClick={() => openLink("//cookie-policy", false)}>
Cookie Policy
</a>
<Link to={"/cookie-policy"}>
<a>Cookie Policy</a>
</Link>
</li>
</ul>
</Space>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/Footer/CookiePolicy/CookiePolicy.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.privacypolicy {
.cookiepolicy {
padding: 64px 10% 64px 10%;
display: flex;

Expand Down
10 changes: 5 additions & 5 deletions ui/src/pages/Footer/CookiePolicy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
<Space direction="vertical" className={style.privacypolicy}>
<div className={style.privacypolicy__header}>
<Typography.Title level={1}>COOKIE POLICY</Typography.Title>
<Space direction="vertical" className={style.cookiepolicy}>
<div className={style.cookiepolicy__header}>
<Typography.Title level={1}>Cookie Policy</Typography.Title>
</div>
<Typography.Paragraph>
This Cookie Policy explains how BinaryTree
Expand Down Expand Up @@ -217,4 +217,4 @@ const PrivacyPolicy = () => {
);
};

export default PrivacyPolicy;
export default CookiePolicy;
4 changes: 3 additions & 1 deletion ui/src/pages/Home/components/Contribution.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const Contribution: React.FC = () => {
return (
<section className={style.home__contribution}>
<Space direction="vertical">
<Typography.Title>Join our community</Typography.Title>
<Typography.Title level={2}>
Join our community
</Typography.Title>
<Typography.Text>
Join our open-source community and help shape the future of
Modern web
Expand Down
9 changes: 6 additions & 3 deletions ui/src/pages/Home/components/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Row gutter={[16, 16]}>
<Col xs={24} lg={8} className={style.home__features}>
<Space direction="vertical">
<Typography.Title>
<Typography.Title level={2}>
BinaryTree comes packed with some awesome features
</Typography.Title>
<Typography.Paragraph>
Expand All @@ -27,7 +30,7 @@ const Features: React.FC = () => {
{FEATURES.map((feature) => (
<Col xs={24} lg={8} key={feature.id}>
<Card
onClick={() => openLink(feature.link, false)}
onClick={() => navigate(feature.link)}
hoverable
>
<Icon name={feature.icon} size={40} />
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/Routes/utils/constant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export const routes: Route[] = [
{
id: "cookiepolicy",
path: "/cookie-policy",
title: "",
title: "Cookie Policy",
description: "",
component: CookiePolicy,
},
Expand Down

0 comments on commit a92c696

Please sign in to comment.