Update deps on SEO and Pages Router courses (#987)

This commit is contained in:
Lee Robinson
2025-01-23 08:16:22 -06:00
committed by GitHub
parent fc6c41c8d1
commit fc3a4e3faa
22 changed files with 200 additions and 142 deletions

View File

@@ -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,
})),