From 150ecc3e8a21c0e0bf5be6465e2affff4cb42158 Mon Sep 17 00:00:00 2001 From: dhatguy Date: Sat, 30 May 2020 13:22:46 +0100 Subject: [PATCH 1/2] make use of layout.js --- components/Account/account.js | 55 +++++---------------- components/Homepage/NewReport.js | 20 +++----- components/Homepage/Reports/Report.js | 19 ++----- components/Homepage/Reports/Reports.js | 20 +++----- components/Homepage/Trips/NewTrip.js | 12 ++--- components/Homepage/Trips/RecentTrips.js | 7 +-- public/images/account/Back-Arrow.svg | 1 - public/images/account/Icon Home-active.svg | 1 - public/images/{account => }/car.png | Bin public/images/{account => }/lock.svg | 0 public/images/{account => }/phone.svg | 0 public/images/{account => }/profile.svg | 0 12 files changed, 41 insertions(+), 94 deletions(-) delete mode 100644 public/images/account/Back-Arrow.svg delete mode 100644 public/images/account/Icon Home-active.svg rename public/images/{account => }/car.png (100%) rename public/images/{account => }/lock.svg (100%) rename public/images/{account => }/phone.svg (100%) rename public/images/{account => }/profile.svg (100%) diff --git a/components/Account/account.js b/components/Account/account.js index fee2bd2..a5ccac8 100644 --- a/components/Account/account.js +++ b/components/Account/account.js @@ -1,27 +1,15 @@ /* eslint-disable no-unused-vars */ import React, { useState } from "react"; -import Router from "next/router"; import { useForm } from "react-hook-form"; import styled from "styled-components"; -import BottomNav from "../Homepage/BottomNav"; import Input from "../Input"; import { H3 } from "../Text/Headings"; import { SubmitButton } from "../Buttons"; - -const NavBar = styled.nav` - height: 54px; - width: 100%; - position: fixed; - background-color: #fff; - box-shadow: 0px 1px 7px #0000001a; - padding: 15px; -`; +import Layout from "../Layout"; const DetailsBody = styled.div` height: 76px; background-color: #fff; - border-radius: 10px; - margin-top: 60px; padding: 15px; margin-bottom: 15px; `; @@ -30,23 +18,10 @@ const Text = styled(H3)` font-weight: normal; `; -export const Nav = props => { - return ( - -
Router.back()}> - back -
- - {props.title} - -
- ); -}; - const Details = ({ name, email }) => { return ( - - profile + + profile
{name} {email} @@ -62,7 +37,7 @@ const Number = ({ number }) => { return (
- phone + phone
Registered Number {number} @@ -100,7 +75,7 @@ const ChangePassword = props => { return (
- password + password
Change Password { setSubmitted(true); }; return ( - +
- password + password
Register as a Transporter { const Account = props => { return ( - <> -
); }; diff --git a/public/images/account/Back-Arrow.svg b/public/images/account/Back-Arrow.svg deleted file mode 100644 index 32ebb55..0000000 --- a/public/images/account/Back-Arrow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/account/Icon Home-active.svg b/public/images/account/Icon Home-active.svg deleted file mode 100644 index c7242ef..0000000 --- a/public/images/account/Icon Home-active.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/account/car.png b/public/images/car.png similarity index 100% rename from public/images/account/car.png rename to public/images/car.png diff --git a/public/images/account/lock.svg b/public/images/lock.svg similarity index 100% rename from public/images/account/lock.svg rename to public/images/lock.svg diff --git a/public/images/account/phone.svg b/public/images/phone.svg similarity index 100% rename from public/images/account/phone.svg rename to public/images/phone.svg diff --git a/public/images/account/profile.svg b/public/images/profile.svg similarity index 100% rename from public/images/account/profile.svg rename to public/images/profile.svg From 3ef95df1625b086ab04cccae6336e9bff0c47818 Mon Sep 17 00:00:00 2001 From: dhatguy Date: Sun, 31 May 2020 20:27:33 +0100 Subject: [PATCH 2/2] codacy error fix --- components/Homepage/NewReport.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Homepage/NewReport.js b/components/Homepage/NewReport.js index e828082..1485706 100644 --- a/components/Homepage/NewReport.js +++ b/components/Homepage/NewReport.js @@ -1,7 +1,7 @@ import styled from "styled-components"; import React from "react"; -import { H3 } from "../Text/Headings" -import { TextSmall } from "../Text/Body" +import { H3 } from "../Text/Headings"; +import { TextSmall } from "../Text/Body"; import Link from "next/link"; const Body = styled.div`