From dd6d92654c7967ef46fba53013441f54cd6fa6e9 Mon Sep 17 00:00:00 2001 From: Ebube Date: Thu, 21 Mar 2024 11:29:38 +0100 Subject: [PATCH] Fixed Layout and switch functionality --- src/App.css | 2 +- src/components/GetStarted/BasicInfo.tsx | 22 +++++++++---------- src/components/GetStarted/GetStarted.tsx | 8 +++---- src/components/GetStarted/InputSection.tsx | 2 +- src/components/GetStarted/OtpSection.tsx | 2 +- src/components/GetStarted/SpouseDetails.tsx | 6 ++--- .../InternetBanking/InternetBanking.tsx | 2 +- src/components/shared/Button.tsx | 12 ++++++++-- src/layouts/GetStartedLayout.tsx | 2 +- src/pages/GetStartedPage.tsx | 8 +++---- 10 files changed, 37 insertions(+), 29 deletions(-) diff --git a/src/App.css b/src/App.css index 904b3aa..90517c2 100644 --- a/src/App.css +++ b/src/App.css @@ -15,7 +15,7 @@ padding-inline: 3rem !important; font-weight: bold !important; font-size: 16px !important; - + background-color: #5A2C82; } .sidebar { diff --git a/src/components/GetStarted/BasicInfo.tsx b/src/components/GetStarted/BasicInfo.tsx index dee726c..5151404 100644 --- a/src/components/GetStarted/BasicInfo.tsx +++ b/src/components/GetStarted/BasicInfo.tsx @@ -4,10 +4,10 @@ import OTPSection from "./OtpSection"; import SpouseDetails from "./SpouseDetails"; import { Button } from ".."; -interface Option { - value: string; - label: string; -} +// interface Option { +// value: string; +// label: string; +// } interface BasicInfoProps { inputValues: { @@ -24,7 +24,7 @@ interface BasicInfoProps { spouseBVN: string; }; setInputValues: React.Dispatch>; - handleNextStep: React.MouseEventHandler; + handleNextStep: any; } const BasicInfo: React.FC = ({ @@ -35,13 +35,13 @@ const BasicInfo: React.FC = ({ const [hideOTPComponent, setHideOTPComponent] = useState(true); const inputRef = useRef(null); - const handleChange = (e: React.ChangeEvent) => { - const { name, value } = e.target; - setInputValues((prev) => ({ ...prev, [name]: value })); + const handleChange = (e: React.FormEvent) => { + const { name, value } = e.target as HTMLInputElement; + setInputValues((prev: typeof inputValues) => ({ ...prev, [name]: value })); }; - const handleInput = (e: React.ChangeEvent) => { - const { name, value } = e.target; + const handleInput = (e: React.FormEvent) => { + const { name, value } = e.target as HTMLInputElement; if (name === "bvn") { const isNumeric = /^[0-9]+$/.test(value); @@ -86,7 +86,7 @@ const BasicInfo: React.FC = ({ inputRef={inputRef} /> diff --git a/src/layouts/GetStartedLayout.tsx b/src/layouts/GetStartedLayout.tsx index 88be2db..433da80 100644 --- a/src/layouts/GetStartedLayout.tsx +++ b/src/layouts/GetStartedLayout.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Footer, Header } from "../components"; interface GetStartedLayoutProps { - children: ReactNode; + children: React.ReactNode; } const GetStartedLayout: React.FC = ({ children }) => { diff --git a/src/pages/GetStartedPage.tsx b/src/pages/GetStartedPage.tsx index 31e6dff..a04fb6c 100644 --- a/src/pages/GetStartedPage.tsx +++ b/src/pages/GetStartedPage.tsx @@ -1,12 +1,12 @@ import React from "react"; -import { GetStarted as Main, Header, Footer } from "../components"; +import { GetStarted as Main } from "../components"; import { GetStartedLayout } from "../layouts"; const GetStartedPage: React.FC = () => { return ( - -
- + +
+ ); }; -- 2.34.1