Skip to content

Commit cb2d2e9

Browse files
author
Sine Jespersen
committed
extract text to const
1 parent cb733ef commit cb2d2e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/routes/RoutePage.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ function RoutePage() {
4444
}
4545

4646
const { title, tags, points, totalDuration, distance, description } = selectedRoute;
47+
const consentText =
48+
"Du har ikke givet samtykke, derfor kan vi ikke vise et kort her. Vil du ændre det, kan du trykke her.";
4749

4850
return (
4951
<>
@@ -58,12 +60,12 @@ function RoutePage() {
5860

5961
{!openStreetMapConsent && !focusOnText && (
6062
<button type="button" onClick={() => setFocusOnText(true)} className="opacity-35 mb-10 text-center">
61-
Du har ikke givet samtykke, derfor kan vi ikke vise et kort her. Vil du ændre det, kan du trykke her.
63+
{consentText}
6264
</button>
6365
)}
6466
{!openStreetMapConsent && focusOnText && (
6567
<button type="button" onClick={() => resetPermission()} className="mb-10 text-center">
66-
Du har ikke givet samtykke, derfor kan vi ikke vise et kort her. Vil du ændre det, kan du trykke her.
68+
{consentText}
6769
</button>
6870
)}
6971

0 commit comments

Comments
 (0)