Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'
const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')
const Index = () => (
<div>
<h1>React ESI demo app</h1>
<main>
<p>Welcome to my news website!</p>
<a>Go to an article</a>
</main>
{/* TODO: introduce a layout */}
</div>
)
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'
import Weather from '../components/Weather'
const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')
const WeatherESI = withESI(Weather, 'Weather')
const Article = () => (
<div>
<h1>An article</h1>
<main>This a specific article of the website!</main>
{/* TODO: introduce a layout */}
<a>Go back to the homepage</a>
</div>
)
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'
const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')
const Index = () => (
<div>
<h1>React ESI demo app</h1>
<main>
<p>Welcome to my news website!</p>
<a>Go to an article</a>
</main>
{/* TODO: introduce a layout */}
</div>
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'
import Weather from '../components/Weather'
const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')
const WeatherESI = withESI(Weather, 'Weather')
const Article = () => (
<div>
<h1>An article</h1>
<main>This a specific article of the website!</main>
{/* TODO: introduce a layout */}
<a>Go back to the homepage</a>
</div>
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'
import Weather from '../components/Weather'
const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')
const WeatherESI = withESI(Weather, 'Weather')
const Article = () => (
<div>
<h1>An article</h1>
<main>This a specific article of the website!</main>
{/* TODO: introduce a layout */}
<a>Go back to the homepage</a>
</div>