Skip to content

Commit de90351

Browse files
committed
updated project name and fixed some issues
1 parent f8a7a5f commit de90351

File tree

17 files changed

+47
-38
lines changed

17 files changed

+47
-38
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
# Fake Store
2+
# SM Store
33

4-
An ECommerce Application built with React, Fake store api and Flutterwave SDK for payment integration.
4+
An Ecommerce Application built with React, Fake store api and Flutterwave SDK for payment integration.
55

66

77

@@ -139,13 +139,13 @@ if you don't have node js installed get it here.
139139
- [ ] Clone the Repository
140140

141141
```
142-
$ git clone https://github.com/nathan-somto/fakestore.git
142+
$ git clone https://github.com/nathan-somto/smstore.git
143143
```
144144

145145
- [ ] Enter into the directory
146146

147147
```
148-
$ cd fakestore
148+
$ cd Smstore
149149
```
150150

151151
- [ ] Install all dependencies

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>FakeStore - Get your fake items today.</title>
6+
<title>SmStore - Get your items with ease and at afforable prices today.</title>
77
<meta name="description" content="An ecommerce site to get
88
various items that you need ranging
99
from clothing to everyday accessories.">
1010
<meta name="keywords" content="ecommerce, clothing, accessories, electronics, fake items, stripe">
11-
<meta property="og:title" content="Fake Store - Get your fake items at unbeliveable rates" />
11+
<meta property="og:title" content="SmStore - Get your fake items at unbeliveable rates" />
1212
<meta property="og:type" content="website" />
1313
<meta property="og:image" content="./public/img-02.jpg" />
1414
<meta property="og:url" content="https://fake-store-blond-pi.vercel.app" />

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "fakestore",
2+
"name": "smstore",
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",

src/components/Banner/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
import { img1, img2, img3 } from "../../assets/Banner";
22
import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
33
import { Carousel } from "react-responsive-carousel";
4+
import { useNavigate } from "react-router-dom";
45
function Banner() {
6+
const navigate = useNavigate();
57
const items = [
68
{
79
heading1: "Men's Collection",
810
para: "New Arrivals",
911
imgUrl: img1,
12+
link: "men's clothing"
1013
},
1114
{
1215
heading1: "Women's Collection",
1316
para: "New Season's",
1417
imgUrl: img2,
18+
link: "women's clothing"
1519
},
1620
{
1721
heading1: "Accessories",
1822
para: "Slick Jacket",
1923
imgUrl: img3,
24+
link: 'jewelery'
2025
},
2126
];
2227
return (
@@ -39,7 +44,7 @@ function Banner() {
3944
<div className="absolute space-y-3 text-left left-[10%] lg:space-y-7 top-[30%] ">
4045
<h3 className="lg:text-3xl opacity-70 ">{item.heading1}</h3>
4146
<h1 className="lg:text-[55px] ">{item.para}</h1>
42-
<button className="py-2 px-10 font-semibold bg-[#2206fb] rounded-[24px] text-[#fff] hover:bg-[#272726] transition-all duration-300 ease-in ">
47+
<button onClick={() =>navigate(`/category/${item.link}`)} className="py-2 px-10 font-semibold bg-[#2206fb] rounded-[24px] text-[#fff] hover:bg-[#272726] transition-all duration-300 ease-in ">
4348
Shop now
4449
</button>
4550
</div>

src/components/CategoryCenter/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function CategoryCenter({ data, setFilter, loading }: props) {
1919
// with the dropdown we sort the items.
2020
function handleFilter(e: ChangeEvent<HTMLSelectElement>) {
2121
if (data === null) return;
22-
const filtered = [...data];
22+
const filtered = data.slice();
2323
switch (e.target.value) {
2424
case "highest rated":
2525
filtered.sort((a, b) => b.rating.rate - a.rating.rate);
@@ -37,7 +37,7 @@ function CategoryCenter({ data, setFilter, loading }: props) {
3737
break;
3838
}
3939
setFilterOption(e.target.value);
40-
setFilter([...filtered]);
40+
setFilter(filtered);
4141
}
4242
return (
4343
<div className="space-y-6">

src/components/Footer/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ function Footer() {
1414
<div className="flex flex-col space-y-4 lg:space-x-[25%] lg:space-y-0 lg:flex-row ">
1515
<div className="flex space-x-24 max-[500px]:flex-col max-[500px]:space-x-0 max-[500px]:space-y-4 lg:space-x-[25%]">
1616
<Link to={"/"} className="uppercase font-bold">
17-
FakeStore
17+
SmStore
1818
</Link>
1919
<div className="flex space-x-4">
2020
<Link
21-
to={"/products/category/acessories"}
21+
to={"/products/category/jewelery"}
2222
className="opacity-70 hover:opacity-100 transition-all ease-in duration-300 hover:text-white"
2323
>
2424
Categories

src/components/Navbar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function Navbar() {
3737
>
3838
<div className="lg:mr-[5%] h-[2.5rem] justify-between flex items-center pl-[1.5rem] lg:pl-0 lg:h-[5rem]">
3939
<Link to={"/"} className="uppercase font-bold">
40-
fakestore
40+
smstore
4141
</Link>
4242
<div
4343
className="hamburger mr-5 cursor-pointer lg:hidden"
@@ -110,7 +110,7 @@ function Navbar() {
110110
</div>
111111
<div className="divide-x flex items-center justify-end lg:absolute lg:right-0">
112112
<form className="border-l h-[2.5rem] lg:h-[5rem] flex relative items-center">
113-
<button className="pl-3">
113+
<button className="pl-3" type="button">
114114
<FaSearch color="#bbb" size="15" />
115115
</button>
116116
<label htmlFor="search">

src/components/ProductCard/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function ProductCard({
1919
// wrapped in a useMemo so as to cache the checking of an item in the cart
2020
const isIteminCart: boolean = useMemo(
2121
() => items.findIndex((item) => item.id === id) !== -1,
22-
[items]
22+
[id, items]
2323
);
2424
const dispatch = useDispatch();
2525
function handleAddToCart() {
@@ -31,7 +31,7 @@ function ProductCard({
3131
const factorOf3 = id % 3 === 0;
3232
const newPrice = factorOf3 ? calculatePercentageOff(price, 30) : price;
3333
return (
34-
<div className="h-[550px] w-[300px] relative group flex-shrink-0 text-[#1e1d1d]">
34+
<div className="h-[350px] md:h-[400px] w-[300px] relative group flex-shrink-0 text-[#1e1d1d]">
3535
{factorOf3 && (
3636
<div className="bg-[#ff3341] p-2 font-semibold text-center absolute top-[50px] left-[5px] text-white">
3737
-30%
@@ -40,7 +40,7 @@ function ProductCard({
4040
<div className="group-hover:opacity-100 opacity-0 text-[#b183b1bb] bg-[#e4e4e4] absolute p-2 top-[50px] right-[5px]">
4141
<AiOutlineHeart />
4242
</div>
43-
<Link to={`/products/${id}`} className="h-[400px] w-full">
43+
<Link to={`/products/${id}`} className=" h-[250px] block md:h-[300px] w-full">
4444
<img
4545
src={image}
4646
alt={`${title} product poster`}

src/components/ProductsRow/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ function ProductsRow() {
6363
</button>
6464
))}
6565
</div>
66-
<div className="relative">
66+
<div className="relative mt-5">
6767
<button
6868
onClick={() => handleScrollClick("right")}
6969
className="absolute top-[50%] right-[10px] rounded-sm text-center bg-[#131313] hover:opacity-70 text-[#ebebeb] z-[10] p-2 shadow-md"
7070
>
7171
<FaChevronRight className="h-4 w-4" />
7272
</button>
7373
<div
74-
className="overflow-x-auto no-scroll flex space-x-12 w-full h-[650px] "
74+
className="overflow-x-auto no-scroll px-8 flex space-x-12 w-full h-[480px] "
7575
ref={rowRef}
7676
>
7777
{/* Product cards go here */}

src/pages/About/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ function About() {
2222
<article className="flex-shrink-0 w-[100%] lg:w-[calc(90%-350px)] text-gray-500 text-[15px] leading-6">
2323
<h2 className="font-bold text-2xl text-gray-700 mb-6">Our Story</h2>
2424
<p>
25-
Welcome to Fake Store, where imagination meets convenience! Our
25+
Welcome to Sm Store, where imagination meets convenience! Our
2626
story began with a simple idea—to transform the way you shop
2727
online. We wanted to create an experience that goes beyond the
2828
ordinary, one that sparks your imagination and fills your life
2929
with joy and inspiration.
3030
</p>
3131
<br />
3232
<p>
33-
At Fake Store, we handpick a diverse range of products that
33+
At Sm Store, we handpick a diverse range of products that
3434
capture the essence of creativity. From innovative gadgets to
3535
trendy accessories, our collection is carefully curated to bring a
3636
touch of magic to your everyday life. We believe in quality,
@@ -42,7 +42,7 @@ function About() {
4242
We're committed to making your shopping journey seamless and
4343
enjoyable. With our user-friendly website, secure transactions,
4444
and dedicated customer service, we aim to provide you with a
45-
hassle-free experience. So, come and join us at Fake Store, and
45+
hassle-free experience. So, come and join us at Sm Store, and
4646
let your imagination run wild as you explore our captivating world
4747
of products. Get ready to embark on an extraordinary shopping
4848
adventure where inspiration and convenience await!
@@ -73,7 +73,7 @@ function About() {
7373
<article className="flex-shrink-0 w-[100%] lg:w-[calc(90%-350px)] text-gray-500 text-[15px] leading-6">
7474
<h2 className="font-bold text-2xl text-gray-700 mb-6">Our Mission</h2>
7575
<p>
76-
At Fake Store, our mission is to ignite the spark of imagination
76+
At Sm Store, our mission is to ignite the spark of imagination
7777
in every shopper, transforming the act of online shopping into a
7878
captivating and joyous experience. We strive to curate a
7979
collection of innovative and whimsical products that inspire

0 commit comments

Comments
 (0)