diff --git a/src/assets/images/personal-page.jpg b/src/assets/images/personal-page.jpg new file mode 100644 index 0000000..04ea6b9 Binary files /dev/null and b/src/assets/images/personal-page.jpg differ diff --git a/src/components/Home/Hero/PersonalHero.tsx b/src/components/Home/Hero/PersonalHero.tsx new file mode 100644 index 0000000..e4b62c7 --- /dev/null +++ b/src/components/Home/Hero/PersonalHero.tsx @@ -0,0 +1,34 @@ +import React from "react"; +import styles from "./hero.module.css"; +import { Link } from "react-router-dom"; + +interface PersonalHeroProps { + heading?: string; + body?: string; + buttonLink?: string; + buttonText?: string; +}; +const PersonalHero: React.FC = ({ + heading, + body, + buttonLink = "#", + buttonText, +}) => { + return ( +
+
+

+ {heading} +

+

{body}

+ + + +
+
+ ); +}; + +export default PersonalHero; diff --git a/src/components/Home/Hero/hero.module.css b/src/components/Home/Hero/hero.module.css index ceda2a7..85f3757 100644 --- a/src/components/Home/Hero/hero.module.css +++ b/src/components/Home/Hero/hero.module.css @@ -6,4 +6,14 @@ display: flex; align-items: center; justify-content: center; +} + +.personalHeroBg{ + background: url(../../../assets/images/personal-page.jpg) no-repeat; + background-size: cover; + background-position: center; + /* padding: 0.4rem 0; */ + display: flex; + align-items: center; + justify-content: center; } \ No newline at end of file diff --git a/src/components/Home/Hero/index.ts b/src/components/Home/Hero/index.ts index ef594a6..cfad588 100644 --- a/src/components/Home/Hero/index.ts +++ b/src/components/Home/Hero/index.ts @@ -1,3 +1,4 @@ import Hero from "./Hero"; +import PersonalHero from "./PersonalHero"; -export { Hero }; +export { Hero, PersonalHero }; diff --git a/src/components/Home/index.ts b/src/components/Home/index.ts index fa6079a..e07aac8 100644 --- a/src/components/Home/index.ts +++ b/src/components/Home/index.ts @@ -1,4 +1,4 @@ -import { Hero } from "./Hero"; +import { Hero, PersonalHero } from "./Hero"; import { Requirements } from "./Requirements"; -export {Hero, Requirements} \ No newline at end of file +export {Hero, Requirements, PersonalHero} \ No newline at end of file diff --git a/src/components/LetsGetStated/LetsGetStarted.tsx b/src/components/LetsGetStated/LetsGetStarted.tsx index b3f0144..0861078 100644 --- a/src/components/LetsGetStated/LetsGetStarted.tsx +++ b/src/components/LetsGetStated/LetsGetStarted.tsx @@ -8,7 +8,8 @@ const LetsGetStarted: React.FC = () => { }); const [hideOTPComponent, setHideOTPComponent] = React.useState(true); - const inputRef = React.useRef(null); + const firstInputRef = React.useRef(null); + const secondInputRef = React.useRef(null); const handleChange = (e: React.ChangeEvent) => { let { name, value } = e.target as HTMLInputElement; @@ -25,6 +26,7 @@ const LetsGetStarted: React.FC = () => { if (regex.test(value)) { if (value?.length == 10) { setHideOTPComponent(false); + secondInputRef.current?.focus(); } else setHideOTPComponent(true); } else { console.log("object not found"); @@ -32,6 +34,8 @@ const LetsGetStarted: React.FC = () => { } }; + console.log(secondInputRef) + return (
@@ -55,7 +59,8 @@ const LetsGetStarted: React.FC = () => { value={pinValues.bvn} onChange={handleChange} onInput={handleInput} - ref={inputRef} + ref={firstInputRef} + maxLength={10} /> {!hideOTPComponent ? ( { value={pinValues.otp} onChange={handleChange} onInput={handleInput} - ref={inputRef} + ref={secondInputRef} /> ) : null}
)} diff --git a/src/pages/BusinessBankingPage.tsx b/src/pages/BusinessBankingPage.tsx index 5185ecc..dafc39b 100644 --- a/src/pages/BusinessBankingPage.tsx +++ b/src/pages/BusinessBankingPage.tsx @@ -1,8 +1,14 @@ import React from "react"; import { HomeLayout } from "../layouts"; +import { PersonalHero } from "../components"; const BusinessBankingPage: React.FC = () => { - return Business Banking; + return ( + + + Business Banking + + ); }; export default BusinessBankingPage; diff --git a/src/pages/CooperateBankingPage.tsx b/src/pages/CooperateBankingPage.tsx index 1a0f845..9c483ab 100644 --- a/src/pages/CooperateBankingPage.tsx +++ b/src/pages/CooperateBankingPage.tsx @@ -1,9 +1,11 @@ import React from 'react' import { HomeLayout } from '../layouts' +import { PersonalHero } from '../components' const CooperateBankingPage: React.FC = () => { return ( + Cooperate Banking ) diff --git a/src/pages/PersonalBankingPage.tsx b/src/pages/PersonalBankingPage.tsx index 95be387..dde2412 100644 --- a/src/pages/PersonalBankingPage.tsx +++ b/src/pages/PersonalBankingPage.tsx @@ -1,9 +1,11 @@ import React from 'react' import { HomeLayout } from '../layouts' +import { PersonalHero } from '../components' const PersonalBankingPage: React.FC = () => { return ( + Personal Banking )