Skip to content

Commit

Permalink
Merge pull request #11 from peripleo/main
Browse files Browse the repository at this point in the history
Page title from dictionary
  • Loading branch information
GilShalit authored Mar 11, 2024
2 parents 6eb82d5 + c029e81 commit d5397d3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@
<meta name="api.base" content="https://kimanliapi.azurewebsites.net/api">
<meta name="maptiler.key" content="8qWEnUOJUigKuqcRIkop">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NBTXXBZ');</script>
</head>

<body>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NBTXXBZ"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

<div id="app"></div>
<script type="module" src="./src/index.jsx"></script>
</body>
Expand Down
10 changes: 8 additions & 2 deletions src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import ReactDOM from 'react-dom/client';
import { SiWikidata } from 'react-icons/si';
import { useTranslation } from 'react-i18next';
import Peripleo, {
AggregationsOverlay,
Controls,
Expand All @@ -11,7 +12,6 @@ import Peripleo, {
MobileMenu,
MyLocationControl,
HeatmapLayer,
Scrollable,
ZoomControl
} from './peripleo';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
Expand All @@ -31,6 +31,12 @@ const App = () => {

const [ loading, setLoading ] = useState(true);

const { t } = useTranslation();

useEffect(() => {
document.title = t('Page title');
}, []);

return (
<QueryClientProvider client={queryClient}>
<Peripleo>
Expand Down

0 comments on commit d5397d3

Please sign in to comment.