Skip to content

Commit

Permalink
#62: More comments on the App.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
bodobraegger committed Apr 11, 2023
1 parent c42765b commit a43d90e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ function App() {
// get data from strapi or local storage if available
// TODO: check if data is up to date
useEffect(() => {
// load data from local storage
let startPageLocal = window.localStorage.getItem(`startPage-${lang}`)
let sectionsLocal = window.localStorage.getItem(`sections-${lang}`)
let linksLocal = window.localStorage.getItem(`links-${lang}`)

// parase data from local storage or pull from strapi
if(startPageLocal !== null) {
setStartPage(JSON.parse(startPageLocal))
console.info('loaded from local storage - startPage')
Expand Down Expand Up @@ -98,6 +100,8 @@ function App() {

checkLinks(sections, links)

// HelmetProvider allows the use of Helmet components to set the title
// and, in the future, meta tags and SEO data
return <div className='App'>
<HelmetProvider>
<Router basename="/">
Expand Down

0 comments on commit a43d90e

Please sign in to comment.