Skip to content

Commit 1df6203

Browse files
committed
Add global font styling to ProfilePage and apply custom font class
1 parent 3aa2e9a commit 1df6203

1 file changed

Lines changed: 23 additions & 12 deletions

File tree

src/components/Profile/ProfilePage.jsx

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import React, { useEffect, useState } from 'react';
2+
import { createGlobalStyle } from 'styled-components';
23
import styled from 'styled-components';
34
import { useParams } from 'react-router-dom';
45
import Profile from './Profile';
56
import profilesList from '../../ProfilesList.json';
67

8+
const GlobalFont = createGlobalStyle`
9+
@import url('https://fonts.googleapis.com/css2?family=Merriweather+Sans:wght@300&display=swap');
10+
.custom-font {
11+
font-family: 'Merriweather Sans', sans-serif;
12+
}
13+
`;
14+
715
const ProfilePage = () => {
816
const { name } = useParams();
917
const [profileData, setProfileData] = useState(null);
@@ -42,19 +50,22 @@ const ProfilePage = () => {
4250
}
4351

4452
return (
45-
<div className="min-h-screen bg-[#0e1a34] pt-12 text-white">
46-
<div className="mx-2 md:mx-16">
47-
<Profile data={profileData} />
48-
</div>
49-
<div className="mt-8 flex justify-center">
50-
<a href="https://www.devdisplay.org" target="_blank" rel="noopener noreferrer">
51-
<StyledButton>
52-
<div className="blob1" />
53-
<div className="inner">Visit DevDisplay</div>
54-
</StyledButton>
55-
</a>
53+
<>
54+
<GlobalFont />
55+
<div className="custom-font min-h-screen bg-[#0e1a34] pt-12 text-white">
56+
<div className="mx-2 md:mx-16">
57+
<Profile data={profileData} />
58+
</div>
59+
<div className="mt-8 flex justify-center">
60+
<a href="https://www.devdisplay.org" target="_blank" rel="noopener noreferrer">
61+
<StyledButton>
62+
<div className="blob1" />
63+
<div className="inner">Visit DevDisplay</div>
64+
</StyledButton>
65+
</a>
66+
</div>
5667
</div>
57-
</div>
68+
</>
5869
);
5970
};
6071

0 commit comments

Comments
 (0)