Skip to content

Commit

Permalink
Page title now pulled from the i18next labels file
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Mar 11, 2024
1 parent d902e5c commit 84c3558
Showing 1 changed file with 8 additions and 2 deletions.
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 84c3558

Please sign in to comment.