-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace react-helmet with gatsby head api
- Loading branch information
Wiebke Freitag
committed
Nov 29, 2023
1 parent
370fc55
commit 3ca87c9
Showing
18 changed files
with
212 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ import * as L from 'leaflet'; | |
import { LatLngExpression } from 'leaflet'; | ||
import { GestureHandling } from 'leaflet-gesture-handling'; | ||
import React, { useEffect, useState } from 'react'; | ||
import { Helmet } from 'react-helmet'; | ||
import { useTranslation } from 'gatsby-plugin-react-i18next'; | ||
import { | ||
CircleMarker, | ||
|
@@ -140,21 +139,5 @@ export const Leaflet = () => { | |
</MapContainerWithHeight> | ||
); | ||
|
||
return ( | ||
<MapWrapper> | ||
<Helmet> | ||
<link | ||
rel="stylesheet" | ||
href="https://unpkg.com/[email protected]/dist/leaflet.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="//unpkg.com/leaflet-gesture-handling/dist/leaflet-gesture-handling.min.css" | ||
type="text/css" | ||
/> | ||
<script src="//unpkg.com/leaflet-gesture-handling"></script> | ||
</Helmet> | ||
{MapView} | ||
</MapWrapper> | ||
); | ||
return <MapWrapper>{MapView}</MapWrapper>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,21 +8,34 @@ interface ContactPageQueryProps { | |
contentfulPage: ContentfulPage; | ||
} | ||
|
||
const Contact = ({ data, location }: PageProps<ContactPageQueryProps>) => { | ||
const Contact = () => <ContactPage />; | ||
export default Contact; | ||
|
||
export const Head = ({ data, location }: PageProps<ContactPageQueryProps>) => { | ||
return ( | ||
<> | ||
<SEO | ||
title={`${data.contentfulPage.title} | Satellytes`} | ||
description={data.contentfulPage.description?.description} | ||
location={location} | ||
/> | ||
<ContactPage /> | ||
{/* | ||
* Styles and Script for Leaflet Hero Map | ||
*/} | ||
<link | ||
rel="stylesheet" | ||
href="https://unpkg.com/[email protected]/dist/leaflet.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="//unpkg.com/leaflet-gesture-handling/dist/leaflet-gesture-handling.min.css" | ||
type="text/css" | ||
/> | ||
<script src="//unpkg.com/leaflet-gesture-handling"></script> | ||
</> | ||
); | ||
}; | ||
|
||
export default Contact; | ||
|
||
export const ContactPageQuery = graphql` | ||
query ($language: String!) { | ||
contentfulPage(slug: { eq: "contact" }, node_locale: { eq: $language }) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.