mirror of
https://github.com/vercel/next-learn.git
synced 2026-07-07 22:18:45 +00:00
Update deps on SEO and Pages Router courses (#987)
This commit is contained in:
@@ -4,6 +4,7 @@ import Head from 'next/head';
|
||||
import Fuse from 'fuse.js';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { countries } from '../countries';
|
||||
import styles from '../styles/Home.module.css';
|
||||
import CodeSampleModal from '../components/CodeSampleModal';
|
||||
|
||||
@@ -100,13 +101,10 @@ export default function Start({ countries }) {
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
const response = await fetch('https://restcountries.com/v3.1/all');
|
||||
const countries = await response.json();
|
||||
|
||||
return {
|
||||
props: {
|
||||
countries: countries.map((country) => ({
|
||||
name: country.name.common,
|
||||
name: country.name,
|
||||
cca2: country.cca2,
|
||||
population: country.population,
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user