From f7ef9ff3a05bb6e2c2d6cb80338d703a593dcdab Mon Sep 17 00:00:00 2001 From: Ebube Date: Mon, 18 Mar 2024 12:31:17 +0100 Subject: [PATCH] fix for production build --- src/components/Footer/BottomFooterOne.tsx | 10 ++ src/components/Footer/MidFooter.tsx | 3 +- src/components/Footer/TopFooterOne.tsx | 24 ++- src/components/Footer/TopFooterOneMenu.tsx | 43 +++-- src/components/GetStarted/BasicInfo.tsx | 112 +++++++------ src/components/GetStarted/GetStarted.tsx | 3 +- src/components/Header/Header.tsx | 4 +- .../Home/Requirements/FeatureText.tsx | 3 +- src/components/shared/Button.tsx | 14 +- src/components/shared/InputCompOne.tsx | 154 +++++++++--------- src/pages/GetStartedPage.tsx | 2 +- src/pages/HomePage.tsx | 6 +- 12 files changed, 204 insertions(+), 174 deletions(-) create mode 100644 src/components/Footer/BottomFooterOne.tsx diff --git a/src/components/Footer/BottomFooterOne.tsx b/src/components/Footer/BottomFooterOne.tsx new file mode 100644 index 0000000..1398fc6 --- /dev/null +++ b/src/components/Footer/BottomFooterOne.tsx @@ -0,0 +1,10 @@ + +const BottomFooterOne = () => { + return ( + + ) +} + +export default BottomFooterOne diff --git a/src/components/Footer/MidFooter.tsx b/src/components/Footer/MidFooter.tsx index 867d5f2..e46e123 100644 --- a/src/components/Footer/MidFooter.tsx +++ b/src/components/Footer/MidFooter.tsx @@ -1,11 +1,10 @@ -import React from 'react' import styles from "./footer.module.css" const MidFooter = () => { return (
-
+

My Bank and I

diff --git a/src/components/Footer/TopFooterOne.tsx b/src/components/Footer/TopFooterOne.tsx index ef4f601..336d16e 100644 --- a/src/components/Footer/TopFooterOne.tsx +++ b/src/components/Footer/TopFooterOne.tsx @@ -1,15 +1,31 @@ -import { FC } from "react"; +import { footerItems } from "../../utils/data"; import TopFooterOneMenu from "./TopFooterOneMenu"; -const TopFooterOne = (): FC => { +export interface TopFooterOneMenuProps { + category: string; + subItems: { + text: string; + href?: string; + }[]; +} + +const TopFooterOne = () => { + const footerListItems: TopFooterOneMenuProps[] = footerItems; + return (

sitemap

-
- +
+ {footerListItems.map(({ category, subItems }, index) => ( + + ))}
diff --git a/src/components/Footer/TopFooterOneMenu.tsx b/src/components/Footer/TopFooterOneMenu.tsx index 5f124c6..36a4923 100644 --- a/src/components/Footer/TopFooterOneMenu.tsx +++ b/src/components/Footer/TopFooterOneMenu.tsx @@ -1,29 +1,28 @@ -import { FC } from "react"; +import React from "react"; import { Link } from "react-router-dom"; -import { footerItems } from "../../utils/data"; +import { TopFooterOneMenuProps } from "./TopFooterOne"; -interface TopFooterOneMenuProps { - category: string; - subItems: { - text: string; - href?: string; - }[]; -} -const TopFooterOneMenu = (): FC => { - return footerItems.map( - ({ category, subItems }): TopFooterOneMenuProps => ( -
    -
  • {category}
  • -
      - {subItems.map(({ href, text }) => ( - - {text} - - ))} -
    +const TopFooterOneMenu: React.FC = ({ + category, + subItems, +}) => { + return ( +
      +
    • + {category} +
    • +
        + {subItems.map(({ href = "#", text }) => ( +
      • + {href ? {text} : {text}} +
      • + ))}
      - ) +
    ); }; diff --git a/src/components/GetStarted/BasicInfo.tsx b/src/components/GetStarted/BasicInfo.tsx index 89fa670..4d6c5db 100644 --- a/src/components/GetStarted/BasicInfo.tsx +++ b/src/components/GetStarted/BasicInfo.tsx @@ -1,7 +1,42 @@ -import { FC } from "react"; -import { InputCompOne } from ".."; +import React, { useRef } from "react"; +import InputCompOne from "../shared/InputCompOne"; + +interface Option { + value: string; + label: string; +} + +const BasicInfo: React.FC = () => { + const inputRef = useRef(null); + + // Array for marital status options + const maritalStatusOptions: Option[] = [ + { value: "", label: "Select" }, + { value: "single", label: "Single" }, + { value: "married", label: "Married" }, + { value: "divorced", label: "Divorced" }, + { value: "widowed", label: "Widowed" }, + ]; + + // Array for title options + const titleOptions: Option[] = [ + { value: "", label: "Select" }, + { value: "ms", label: "Ms" }, + { value: "mr", label: "Mr" }, + { value: "miss", label: "Miss" }, + { value: "mrs", label: "Mrs" }, + ]; + + const handleChange = (e: React.ChangeEvent) => { + // Handle input value changes + console.log(e.target.value); + }; + + const handleInput = (e: React.FormEvent) => { + // Handle input events + console.log(e); + }; -const BasicInfo = (): FC => { return (
    @@ -12,28 +47,11 @@ const BasicInfo = (): FC => { labelClass="font-bold text-[18px] leading-[21.78px] tracking-[2%] text-[#5C2684] mb-[2px]" select selectClass="w-full h-[36px]" - selectOptions={[ - { - value: "", - label: "Select", - }, - { - value: "ms", - label: "Ms", - }, - { - value: "mr", - label: "Mr", - }, - { - value: "miss", - label: "Miss", - }, - { - value: "mrs", - label: "Mrs", - }, - ]} + selectOptions={titleOptions} + value="" + onChange={handleChange} + onInput={handleInput} + ref={inputRef} /> { labelClass="font-bold text-[18px] leading-[21.78px] tracking-[2%] text-[#5C2684] mb-[2px]" select selectClass="w-full h-[36px]" - selectOptions={[ - { - value: "", - label: "Select", - }, - { - value: "ms", - label: "Ms", - }, - { - value: "mr", - label: "Mr", - }, - { - value: "miss", - label: "Miss", - }, - { - value: "mrs", - label: "Mrs", - }, - ]} + selectOptions={maritalStatusOptions} + value="" + onChange={handleChange} + onInput={handleInput} + ref={inputRef} /> { labelClass="font-bold text-[18px] leading-[21.78px] tracking-[2%] text-[#5C2684] mb-[2px] gap-[2px]" input inputClass="w-full h-[36px] bg-[#EFEFEF] px-[2px]" + value="" + onChange={handleChange} + onInput={handleInput} + ref={inputRef} />
    diff --git a/src/components/GetStarted/GetStarted.tsx b/src/components/GetStarted/GetStarted.tsx index ea6a80d..ede4d69 100644 --- a/src/components/GetStarted/GetStarted.tsx +++ b/src/components/GetStarted/GetStarted.tsx @@ -1,7 +1,6 @@ -import { FC } from "react"; import BasicInfo from "./BasicInfo"; -const GetStarted: FC = () => { +const GetStarted = () => { return (
    diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index ad41802..1c95973 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -1,4 +1,4 @@ -import { useState, ChangeEvent, FC } from "react"; +import React, { useState, ChangeEvent } from "react"; import Logo from "../../assets/icons/logo.svg"; import Button from "../shared/Button"; import { lowerMenuItems } from "../../utils/data"; @@ -15,7 +15,7 @@ type HiddenMenuItems = { hideMenu?: boolean; }; -const Header: FC = ({ +const Header: React.FC = ({ hideSidebar = false, hideMenu = false, }) => { diff --git a/src/components/Home/Requirements/FeatureText.tsx b/src/components/Home/Requirements/FeatureText.tsx index 518349c..e4e9c44 100644 --- a/src/components/Home/Requirements/FeatureText.tsx +++ b/src/components/Home/Requirements/FeatureText.tsx @@ -1,8 +1,7 @@ -import { FC } from "react"; import { Link } from "react-router-dom"; import { RouteHandler } from "../../../router/routes"; -const FeatureText: FC = () => { +const FeatureText = () => { return (
    diff --git a/src/components/shared/Button.tsx b/src/components/shared/Button.tsx index 2bf778d..3aca917 100644 --- a/src/components/shared/Button.tsx +++ b/src/components/shared/Button.tsx @@ -1,10 +1,12 @@ -import { FC } from "react"; -type ButtonProps = { - className?: string; - text: string; -}; +import React from "react"; -const Button = ({ text, className }: ButtonProps): FC => { +interface ButtonProps { + text: string; + className?: string; + onClick?: () => void; +} + +const Button: React.FC = ({ text, className }) => { return (