Skip to content

Commit eee0a70

Browse files
committed
Get clients data from utils
1 parent 452b3d3 commit eee0a70

File tree

4 files changed

+67
-63
lines changed

4 files changed

+67
-63
lines changed

src/components/AboutClientSingle.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
const AboutClientSingle = ({ clients }) => {
1+
const AboutClientSingle = ({ title, image }) => {
22
return (
33
<>
4-
{clients.map((client) => (
5-
<img
6-
src={client.img}
7-
className="w-64 py-5 px-10 border bg-secondary-light border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
8-
alt={client.title}
9-
/>
10-
))}
4+
<img
5+
src={image}
6+
className="w-64 py-5 px-10 border bg-secondary-light border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
7+
alt={title}
8+
/>
119
</>
1210
);
1311
};

src/components/AboutClients.js

+9-54
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,20 @@
1-
import AmazonImage from '../images/brands/amazon_gray.png';
2-
import SonyImage from '../images/brands/sony_gray.png';
3-
import AdidasImage from '../images/brands/adidas_gray.png';
4-
import FilaImage from '../images/brands/fila_gray.png';
5-
import NBImage from '../images/brands/nb_gray.png';
6-
import SamsungImage from '../images/brands/samsung_gray.png';
7-
import CanonImage from '../images/brands/canon_gray.png';
8-
import PumaImage from '../images/brands/puma_gray.png';
91
import AboutClientSingle from './AboutClientSingle';
10-
11-
const clientsHeading = 'Some of the brands I worked with';
12-
const clientsData = [
13-
{
14-
id: 1,
15-
title: 'Amazon',
16-
img: AmazonImage,
17-
},
18-
{
19-
id: 2,
20-
title: 'Sony',
21-
img: SonyImage,
22-
},
23-
{
24-
id: 3,
25-
title: 'Adidas',
26-
img: AdidasImage,
27-
},
28-
{
29-
id: 4,
30-
title: 'FILA',
31-
img: FilaImage,
32-
},
33-
{
34-
id: 5,
35-
title: 'NB',
36-
img: NBImage,
37-
},
38-
{
39-
id: 6,
40-
title: 'SAMSUNG',
41-
img: SamsungImage,
42-
},
43-
{
44-
id: 7,
45-
title: 'CANON',
46-
img: CanonImage,
47-
},
48-
{
49-
id: 7,
50-
title: 'PUMA',
51-
img: PumaImage,
52-
},
53-
];
2+
import { ClientsData, ClientsHeading } from '../utils/ClientsData';
543

554
const AboutClients = () => {
565
return (
576
<div className="mt-10 sm:mt-20">
587
<p className="text-2xl sm:text-4xl text-primary-dark dark:text-primary-light font-sans font-semibold">
59-
{clientsHeading}
8+
{ClientsHeading}
609
</p>
6110
<div className="grid grid-cols-2 sm:grid-cols-4 mt-10 sm:mt-20 gap-2">
62-
<AboutClientSingle clients={clientsData} />
11+
{ClientsData.map((client) => (
12+
<AboutClientSingle
13+
title={client.title}
14+
image={client.img}
15+
key={client.id}
16+
/>
17+
))}
6318
</div>
6419
</div>
6520
);

src/components/HireMeModal.js

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ const HireMeModal = ({ onClose, onRequest }) => {
9191
rounded-md
9292
sm:rounded-lg
9393
focus:ring-1 focus:ring-indigo-900"
94-
type="button"
9594
aria-label="Submit Request"
9695
>
9796
Send Request

src/utils/ClientsData.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import AmazonImage from '../images/brands/amazon_gray.png';
2+
import SonyImage from '../images/brands/sony_gray.png';
3+
import AdidasImage from '../images/brands/adidas_gray.png';
4+
import FilaImage from '../images/brands/fila_gray.png';
5+
import NBImage from '../images/brands/nb_gray.png';
6+
import SamsungImage from '../images/brands/samsung_gray.png';
7+
import CanonImage from '../images/brands/canon_gray.png';
8+
import PumaImage from '../images/brands/puma_gray.png';
9+
10+
export const ClientsHeading = 'Some of the brands I worked with';
11+
export const ClientsData = [
12+
{
13+
id: 1,
14+
title: 'Amazon',
15+
img: AmazonImage,
16+
},
17+
{
18+
id: 2,
19+
title: 'Sony',
20+
img: SonyImage,
21+
},
22+
{
23+
id: 3,
24+
title: 'Adidas',
25+
img: AdidasImage,
26+
},
27+
{
28+
id: 4,
29+
title: 'FILA',
30+
img: FilaImage,
31+
},
32+
{
33+
id: 5,
34+
title: 'NB',
35+
img: NBImage,
36+
},
37+
{
38+
id: 6,
39+
title: 'SAMSUNG',
40+
img: SamsungImage,
41+
},
42+
{
43+
id: 7,
44+
title: 'CANON',
45+
img: CanonImage,
46+
},
47+
{
48+
id: 7,
49+
title: 'PUMA',
50+
img: PumaImage,
51+
},
52+
];

0 commit comments

Comments
 (0)