Skip to content

Commit 22be5d4

Browse files
committed
bug fixed!
1 parent d665a25 commit 22be5d4

16 files changed

+110
-54
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/App.jsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Blogs from "./pages/Blogs";
77
import Login from "./pages/Login";
88
import Signup from "./pages/Signup";
99
import Contact from "./pages/Contact";
10+
import Pages from "./pages/Pages";
1011
import Products from "./pages/Products";
1112
import RootComponent from "./components/RootComponent";
1213

@@ -19,14 +20,15 @@ const router = createBrowserRouter([
1920
path: "",
2021
element: <Home />,
2122
},
22-
{
23-
path: "pages",
24-
element: <h1>Pages</h1>,
25-
},
23+
2624
{
2725
path: "products",
2826
element: <Products />,
2927
},
28+
{
29+
path: "pages",
30+
element: <Pages />,
31+
},
3032
{
3133
path: "blogs",
3234
element: <Blogs />,

src/components/BreadCrumb.jsx

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
import React from "react";
22
import { Link } from "react-router-dom";
33

4-
export default function BreadCrumb() {
4+
export default function BreadCrumb({ title, links }) {
55
return (
66
<div className=" bg-[#F6F5FF]">
77
<div className="container ">
88
<div className=" mb-8 py-[39px] sm:py-[47px] md:py-[57px] lg:py-[68px] xl:py-[82px] xxl:py-[98px]">
9-
{/* text */}
109
<h1 className=" font-Josefin text-[18px] sm:text-[16px] lg:text-[20px] xl:text-[25px] xxl:text-[36px]">
11-
My Account
10+
{title}
1211
</h1>
13-
14-
<div className=" flex gap-[5px] font-Lato text-[14px]">
15-
<Link to="/" className="hover:text-secondary">
16-
Home .
17-
</Link>
18-
<Link to="/pages" className="hover:text-secondary">
19-
Pages .
20-
</Link>
21-
<span className="text-secondary">My Account</span>
22-
</div>
12+
{links.map((link, index) => {
13+
return (
14+
<Link
15+
className={`mr-2 ${index + 1 == links.length ? "text-secondary" : ""}`}
16+
to={link.url}
17+
>
18+
{link.title}
19+
</Link>
20+
);
21+
})}
2322
</div>
2423
</div>
2524
</div>

src/components/Header.jsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function Header() {
2525

2626
return (
2727
<>
28-
<header className="">
28+
<header>
2929
{/* upper Nav */}
3030
<div className=" bg-primary">
3131
<nav className="font-josefin py-[14px] text-white sm:container sm:flex sm:justify-between">
@@ -45,13 +45,11 @@ export default function Header() {
4545

4646
<div className="justify-between">
4747
<select className="bg-transparent font-sans ">
48-
English
4948
<FaAngleDown className="inline-block" />
5049
<option className="dropdown">English</option>
50+
<option className="dropdown">Korean</option>
5151
<option className="dropdown">Nepali</option>
5252
<option className="dropdown">Hindi</option>
53-
<option className="dropdown">Japanese</option>
54-
<option className="dropdown">Korean</option>
5553
</select>
5654
{/* <span className="font-sans " >
5755
USD
@@ -60,11 +58,11 @@ export default function Header() {
6058

6159
{/* <select> */}
6260
<select className="bg-transparent font-sans">
63-
USD
6461
<FaAngleDown className="inline-block" />
6562
<option className="dropdown">USD</option>
66-
<option className="dropdown">IND</option>
63+
<option className="dropdown">KRR</option>
6764
<option className="dropdown">NPR</option>
65+
<option className="dropdown">INR</option>
6866
</select>
6967

7068
<Link to="/login" className="font-sans">

src/components/RootComponent.jsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ import React from "react";
22
import Header from "./Header";
33
import { Outlet } from "react-router-dom";
44
import Footer from "./Footer";
5+
import footerImg from "/assets/loginFooter.png";
56

67
export default function RootComponent() {
78
return (
89
<>
910
<Header />
10-
<Outlet/>
11-
<Footer/>
11+
<Outlet />
12+
<img src={footerImg} className="container my-[40px]" />
13+
<Footer />
1214
</>
1315
);
1416
}

src/pages/Blogs.jsx

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
import React from 'react'
1+
import React from "react";
2+
import BreadCrumb from "../components/BreadCrumb";
23

34
export default function Blogs() {
45
return (
5-
<div>Blogs</div>
6-
)
6+
<>
7+
<BreadCrumb
8+
title={"Blogs"}
9+
links={[
10+
{ title: "Home", url: "/" },
11+
{ title: ". Pages", url: "/pages" },
12+
{ title: ". Blogs", url: "/blogs" },
13+
]}
14+
/>
15+
<div>Blogs</div>
16+
</>
17+
);
718
}

src/pages/Contact.jsx

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
import React from 'react'
1+
import React from "react";
2+
import BreadCrumb from "../components/BreadCrumb";
23

34
export default function Contact() {
45
return (
5-
<div>Contact</div>
6-
)
6+
<>
7+
<BreadCrumb
8+
title={"Contact"}
9+
links={[
10+
{ title: "Home", url: "/" },
11+
{ title: ". Pages", url: "/pages" },
12+
{ title: ". Contact", url: "/contact" },
13+
]}
14+
/>
15+
16+
<div>Contact</div>
17+
</>
18+
);
719
}

src/pages/Home.jsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default function Home() {
1616
autoplaySpeed: 2000,
1717
pauseOnHover: true,
1818
initialSlide: 0,
19+
arrow: false,
1920
responsive: [
2021
{
2122
breakpoint: 1024,
@@ -74,11 +75,7 @@ export default function Home() {
7475

7576
return (
7677
<>
77-
{/* <div className="absolute box bg-orange-200 left-6 top-3 z-10"></div>
78-
<div className="absolute box bg-black z-0 "></div>
79-
<hr /> */}
80-
81-
{/* <Slider {...settings}>
78+
<Slider {...settings}>
8279
{banners.map((el) => {
8380
return (
8481
<Banner
@@ -87,10 +84,11 @@ export default function Home() {
8784
heading={el.heading}
8885
description={el.description}
8986
redirectUrl={el.redirectUrl}
90-
className="z-0"/>
87+
className="z-0"
88+
/>
9189
);
9290
})}
93-
</Slider> */}
91+
</Slider>
9492

9593
<div className="container grid gap-4 py-[116px] sm:py-[130px] md:grid-cols-2 md:py-[148px] lg:grid-cols-4 lg:py-[166px] xl:py-[188px] xxl:py-[210px]">
9694
{products.map((el) => {

src/pages/Login.jsx

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import React from "react";
22
import { Link } from "react-router-dom";
3-
import footerImg from "/assets/loginFooter.png";
43
import BreadCrumb from "../components/BreadCrumb";
54

65
export default function Login() {
76
return (
87
<>
98
{/* Top Div with text */}
10-
<BreadCrumb />
9+
<BreadCrumb
10+
title="Login"
11+
links={[
12+
{ title: "Home", url: "/" },
13+
{ title: ". Pages", url: "/pages" },
14+
{ title: ". Login", url: "#" },
15+
]}
16+
/>
1117
{/* Login Panel */}
1218
<div className="mx-auto mt-[67px] flex w-[302px] items-center justify-center p-[28px] shadow-lg md:w-[544px]">
1319
<div className="font-lato space-y-2 p-[24px] ">
@@ -49,7 +55,7 @@ export default function Login() {
4955
<p className="text-gray-light">
5056
Don’t have an Account?
5157
<Link
52-
to={"/Signup"}
58+
to={"/signup"}
5359
title="Create a New Account"
5460
className="text-[#558cf3]"
5561
>
@@ -58,7 +64,6 @@ export default function Login() {
5864
</p>
5965
</div>
6066
</div>
61-
<img src={footerImg} className="container my-[40px]" />
6267
</>
6368
);
6469
}

src/pages/Pages.jsx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React from "react";
2+
import BreadCrumb from "../components/BreadCrumb";
3+
4+
export default function Pages() {
5+
return (
6+
<>
7+
<BreadCrumb
8+
title={"Pages"}
9+
links={[
10+
{ title: "Home", url: "/" },
11+
{ title: ". Pages", url: "/Pages" },
12+
]}
13+
/>
14+
<div>Pages</div>
15+
</>
16+
);
17+
}

src/pages/Products.jsx

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
import React from "react";
22
import { FaCartPlus } from "react-icons/fa";
3+
import BreadCrumb from "../components/BreadCrumb";
34

45
export default function Products(props) {
56
return (
6-
<div className=" group relative bg-primary-light shadow-[0px_0px_25px_0px_rgba(0,0,0,0.1)] ">
7-
<div className=" absolute left-[11px] top-[11px] hidden h-[30px] w-[30px] items-center justify-center rounded-full border border-primary transition-all group-hover:flex">
8-
<FaCartPlus className="text-primary" />
7+
<>
8+
<div className=" bg-primary-light group relative shadow-[0px_0px_25px_0px_rgba(0,0,0,0.1)] ">
9+
<div className=" absolute left-[11px] top-[11px] hidden h-[30px] w-[30px] items-center justify-center rounded-full border border-primary transition-all group-hover:flex">
10+
<FaCartPlus className="text-primary" />
11+
</div>
12+
<img
13+
src={props.image}
14+
className="mx-auto mb-[10px] mt-[32px] h-[150px] w-full object-cover "
15+
/>
16+
<div className="bg-white p-[15px] text-center transition-all group-hover:bg-primary group-hover:text-white">
17+
<p>{props.name}</p>
18+
<p>Code - Y523201</p>
19+
<p>${props.price}</p>
20+
</div>
921
</div>
10-
<img src={props.image} className="h-[150px] w-full object-cover mx-auto mb-[10px] mt-[32px] " />
11-
<div className="bg-white p-[15px] text-center transition-all group-hover:bg-primary group-hover:text-white">
12-
<p>{props.name}</p>
13-
<p>Code - Y523201</p>
14-
<p>${props.price}</p>
15-
</div>
16-
</div>
22+
</>
1723
);
18-
}
24+
}

src/pages/Signup.jsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ export default function Signup() {
3939
}
4040
return (
4141
<>
42-
<BreadCrumb />
42+
<BreadCrumb
43+
title={"Sign Up"}
44+
links={[
45+
{title: "Home", url:"/"},
46+
{title: ". Signup", url:"#"},
47+
]}
48+
/>
4349
<div className="mx-auto mt-[67px] flex w-[302px] items-center justify-center p-[28px] shadow-lg md:w-[544px]">
4450
<div className="font-lato space-y-2 p-[24px] ">
4551
<div>

0 commit comments

Comments
 (0)