Skip to content

Commit

Permalink
extract text to const
Browse files Browse the repository at this point in the history
  • Loading branch information
sinejespersen committed Dec 20, 2024
1 parent cb733ef commit cb2d2e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/routes/RoutePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ function RoutePage() {
}

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

return (
<>
Expand All @@ -58,12 +60,12 @@ function RoutePage() {

{!openStreetMapConsent && !focusOnText && (
<button type="button" onClick={() => setFocusOnText(true)} className="opacity-35 mb-10 text-center">
Du har ikke givet samtykke, derfor kan vi ikke vise et kort her. Vil du ændre det, kan du trykke her.
{consentText}
</button>
)}
{!openStreetMapConsent && focusOnText && (
<button type="button" onClick={() => resetPermission()} className="mb-10 text-center">
Du har ikke givet samtykke, derfor kan vi ikke vise et kort her. Vil du ændre det, kan du trykke her.
{consentText}
</button>
)}

Expand Down

0 comments on commit cb2d2e9

Please sign in to comment.