Skip to content

Commit 4e67228

Browse files
authored
Merge pull request #276 from IFRCGo/fix/font-import
Separate font imports into separate links
2 parents 822bf63 + d08c6c2 commit 4e67228

File tree

7 files changed

+34
-24
lines changed

7 files changed

+34
-24
lines changed

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
</title>
2424
<link rel="preconnect" href="https://fonts.googleapis.com">
2525
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
26-
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Montserrat:wght@300;400;600;700&family=OpenSans:wght@300;400;600;700&display=swap" rel="stylesheet">
26+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
27+
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap" rel="stylesheet">
28+
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap" rel="stylesheet">
29+
30+
<!-- link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Montserrat:wght@300;400;600;700&family=OpenSans:wght@300;400;600;700&display=swap" rel="stylesheet" -->
2731
<style>
2832
html, body {
2933
margin: 0;

src/App/PageError/index.tsx

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { useEffect } from 'react';
1+
import { useCallback, useEffect } from 'react';
22
import { useRouteError } from 'react-router-dom';
33

44
import useBooleanState from '#hooks/useBooleanState';
5-
import Button, { useButtonFeatures } from '#components/Button';
5+
import Button from '#components/Button';
6+
import Link from '#components/Link';
67

78
import styles from './styles.module.css';
89

@@ -24,9 +25,15 @@ function PageError() {
2425
toggle: toggleFullErrorVisibility,
2526
},
2627
] = useBooleanState(false);
27-
const {
28-
className: containerClassName,
29-
} = useButtonFeatures({});
28+
29+
const handleReloadButtonClick = useCallback(
30+
() => {
31+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
32+
// @ts-ignore
33+
window.location.reload(true);
34+
},
35+
[],
36+
);
3037

3138
return (
3239
<div className={styles.pageError}>
@@ -66,13 +73,21 @@ function PageError() {
6673
</div>
6774
<div className={styles.footer}>
6875
{/* NOTE: using the anchor element as it will refresh the page */}
69-
<a
70-
className={containerClassName}
76+
<Link
7177
href="/"
78+
external
79+
variant="secondary"
7280
>
7381
{/* FIXME: use translations */}
7482
Go back to homepage
75-
</a>
83+
</Link>
84+
<Button
85+
name={undefined}
86+
onClick={handleReloadButtonClick}
87+
>
88+
{/* FIXME: use translations */}
89+
Reload
90+
</Button>
7691
</div>
7792
</div>
7893
</div>

src/App/PageError/styles.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
display: flex;
4444
align-items: center;
4545
justify-content: flex-end;
46+
gap: var(--go-ui-spacing-md);
4647
}
4748
}
4849
}

src/components/Breadcrumbs/styles.module.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,10 @@
88

99
&:not(:last-child) {
1010
color: var(--go-ui-color-gray-70);
11-
font-weight: var(--go-ui-font-weight-light);
12-
:hover {
13-
text-decoration: underline;
14-
color: var(--go-ui-color-primary-red);
15-
}
1611
}
1712

1813
&:last-child {
1914
color: var(--go-ui-color-black);
20-
font-weight: var(--go-ui-font-weight-semibold);
2115
}
2216
}
2317

src/index.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,11 @@
4242
--go-ui-line-height-sm: 1.375;
4343
--go-ui-line-height-md: 1.5;
4444

45-
--go-ui-font-weight-thin: 100;
46-
--go-ui-font-weight-extra-light: 200;
4745
--go-ui-font-weight-light: 300;
4846
--go-ui-font-weight-normal: 400;
4947
--go-ui-font-weight-medium: 500;
5048
--go-ui-font-weight-semibold: 600;
5149
--go-ui-font-weight-bold: 700;
52-
--go-ui-font-weight-extrabold: 800;
53-
--go-ui-font-weight-black: 900;
5450

5551
--go-ui-width-screen-sm: 640px;
5652
--go-ui-width-screen-md: 768px;
@@ -267,4 +263,8 @@ ul, ol, p {
267263
size: portrait A4;
268264
margin: 10mm;
269265
}
266+
267+
body {
268+
font-family: 'Open Sans', sans-serif;
269+
}
270270
}

src/views/Emergencies/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export function Component() {
312312
</Fragment>
313313
))}
314314
</div>
315-
<div className={styles.footerDescription}>
315+
<div>
316316
{strings.emergencyPerformanceProblems}
317317
</div>
318318
</div>

src/views/Emergencies/styles.module.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,5 @@
5757
display: flex;
5858
gap: var(--go-ui-spacing-xs);
5959
}
60-
61-
.footer-description {
62-
font-style: italic;
63-
}
6460
}
6561
}

0 commit comments

Comments
 (0)