mirror of
https://github.com/vercel/next-learn.git
synced 2026-07-02 17:08:42 +00:00
Update deps on SEO and Pages Router courses (#987)
This commit is contained in:
@@ -1 +0,0 @@
|
||||
18
|
||||
32
seo/countries.js
Normal file
32
seo/countries.js
Normal file
@@ -0,0 +1,32 @@
|
||||
export const countries = [
|
||||
{ name: "China", cca2: "CN", population: 1439323776 },
|
||||
{ name: "India", cca2: "IN", population: 1380004385 },
|
||||
{ name: "United States", cca2: "US", population: 331002651 },
|
||||
{ name: "Indonesia", cca2: "ID", population: 273523615 },
|
||||
{ name: "Pakistan", cca2: "PK", population: 220892340 },
|
||||
{ name: "Brazil", cca2: "BR", population: 212559417 },
|
||||
{ name: "Nigeria", cca2: "NG", population: 206139589 },
|
||||
{ name: "Bangladesh", cca2: "BD", population: 164689383 },
|
||||
{ name: "Russia", cca2: "RU", population: 145934462 },
|
||||
{ name: "Mexico", cca2: "MX", population: 128932753 },
|
||||
{ name: "Japan", cca2: "JP", population: 126476461 },
|
||||
{ name: "Philippines", cca2: "PH", population: 109581078 },
|
||||
{ name: "Egypt", cca2: "EG", population: 102334404 },
|
||||
{ name: "Ethiopia", cca2: "ET", population: 114963588 },
|
||||
{ name: "Vietnam", cca2: "VN", population: 97338579 },
|
||||
{ name: "Germany", cca2: "DE", population: 83783942 },
|
||||
{ name: "Turkey", cca2: "TR", population: 84339067 },
|
||||
{ name: "Iran", cca2: "IR", population: 83992949 },
|
||||
{ name: "Thailand", cca2: "TH", population: 69799978 },
|
||||
{ name: "United Kingdom", cca2: "GB", population: 67886011 },
|
||||
{ name: "France", cca2: "FR", population: 65273511 },
|
||||
{ name: "Italy", cca2: "IT", population: 60461826 },
|
||||
{ name: "South Africa", cca2: "ZA", population: 59308690 },
|
||||
{ name: "Tanzania", cca2: "TZ", population: 59734218 },
|
||||
{ name: "Myanmar", cca2: "MM", population: 54409800 },
|
||||
{ name: "South Korea", cca2: "KR", population: 51269185 },
|
||||
{ name: "Colombia", cca2: "CO", population: 50882891 },
|
||||
{ name: "Kenya", cca2: "KE", population: 53771296 },
|
||||
{ name: "Spain", cca2: "ES", population: 46754778 },
|
||||
{ name: "Argentina", cca2: "AR", population: 45195774 }
|
||||
];
|
||||
@@ -1 +0,0 @@
|
||||
18
|
||||
32
seo/demo/countries.js
Normal file
32
seo/demo/countries.js
Normal file
@@ -0,0 +1,32 @@
|
||||
export const countries = [
|
||||
{ name: "China", cca2: "CN", population: 1439323776 },
|
||||
{ name: "India", cca2: "IN", population: 1380004385 },
|
||||
{ name: "United States", cca2: "US", population: 331002651 },
|
||||
{ name: "Indonesia", cca2: "ID", population: 273523615 },
|
||||
{ name: "Pakistan", cca2: "PK", population: 220892340 },
|
||||
{ name: "Brazil", cca2: "BR", population: 212559417 },
|
||||
{ name: "Nigeria", cca2: "NG", population: 206139589 },
|
||||
{ name: "Bangladesh", cca2: "BD", population: 164689383 },
|
||||
{ name: "Russia", cca2: "RU", population: 145934462 },
|
||||
{ name: "Mexico", cca2: "MX", population: 128932753 },
|
||||
{ name: "Japan", cca2: "JP", population: 126476461 },
|
||||
{ name: "Philippines", cca2: "PH", population: 109581078 },
|
||||
{ name: "Egypt", cca2: "EG", population: 102334404 },
|
||||
{ name: "Ethiopia", cca2: "ET", population: 114963588 },
|
||||
{ name: "Vietnam", cca2: "VN", population: 97338579 },
|
||||
{ name: "Germany", cca2: "DE", population: 83783942 },
|
||||
{ name: "Turkey", cca2: "TR", population: 84339067 },
|
||||
{ name: "Iran", cca2: "IR", population: 83992949 },
|
||||
{ name: "Thailand", cca2: "TH", population: 69799978 },
|
||||
{ name: "United Kingdom", cca2: "GB", population: 67886011 },
|
||||
{ name: "France", cca2: "FR", population: 65273511 },
|
||||
{ name: "Italy", cca2: "IT", population: 60461826 },
|
||||
{ name: "South Africa", cca2: "ZA", population: 59308690 },
|
||||
{ name: "Tanzania", cca2: "TZ", population: 59734218 },
|
||||
{ name: "Myanmar", cca2: "MM", population: 54409800 },
|
||||
{ name: "South Korea", cca2: "KR", population: 51269185 },
|
||||
{ name: "Colombia", cca2: "CO", population: 50882891 },
|
||||
{ name: "Kenya", cca2: "KE", population: 53771296 },
|
||||
{ name: "Spain", cca2: "ES", population: 46754778 },
|
||||
{ name: "Argentina", cca2: "AR", population: 45195774 }
|
||||
];
|
||||
@@ -2,17 +2,17 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"dev": "next dev",
|
||||
"dev": "next dev --turbopack",
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"fuse.js": "^6.6.2",
|
||||
"lodash": "^4.17.21",
|
||||
"next": "latest",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-modal": "^3.16.1",
|
||||
"react-syntax-highlighter": "^15.5.0"
|
||||
"next": "^15.1.6",
|
||||
"react": "latest",
|
||||
"react-dom": "latest",
|
||||
"react-modal": "^3.16.3",
|
||||
"react-syntax-highlighter": "^15.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useState } from 'react';
|
||||
import Head from 'next/head';
|
||||
import dynamic from 'next/dynamic';
|
||||
|
||||
import { countries } from '../countries';
|
||||
import styles from '../styles/Home.module.css';
|
||||
import Image from 'next/image';
|
||||
|
||||
@@ -113,13 +114,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,
|
||||
})),
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"dev": "next dev",
|
||||
"dev": "next dev --turbopack",
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"fuse.js": "^6.6.2",
|
||||
"lodash": "^4.17.21",
|
||||
"next": "latest",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-modal": "^3.16.1",
|
||||
"react-syntax-highlighter": "^15.5.0"
|
||||
"next": "^15.1.6",
|
||||
"react": "latest",
|
||||
"react-dom": "latest",
|
||||
"react-modal": "^3.16.3",
|
||||
"react-syntax-highlighter": "^15.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
||||
@@ -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