Skip to content

Commit

Permalink
feat: update country data
Browse files Browse the repository at this point in the history
  • Loading branch information
martapanc committed Sep 22, 2024
1 parent 3379859 commit 7fe1dd3
Show file tree
Hide file tree
Showing 6 changed files with 979 additions and 1,456 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
"classnames": "^2.5.1",
"clsx": "^2.1.1",
"cookie": "^0.6.0",
"focus-trap-react": "^10.2.3",
"focus-trap-react": "^10.3.0",
"formik": "^2.4.6",
"framer-motion": "^11.5.4",
"i18next": "^23.14.0",
"framer-motion": "^11.5.6",
"i18next": "^23.15.1",
"inquirer-fuzzy-path": "^2.3.0",
"js-cookie": "^3.0.5",
"moment": "^2.30.1",
"next": "^14.2.8",
"next-cloudinary": "^6.12.0",
"next": "^14.2.13",
"next-cloudinary": "^6.13.0",
"next-themes": "^0.3.0",
"node-fetch": "^3.3.2",
"nodemailer": "^6.9.15",
Expand All @@ -57,7 +57,7 @@
"react-dom": "^18.3.1",
"react-google-recaptcha": "^3.1.0",
"react-headroom": "^3.2.1",
"react-i18next": "^15.0.1",
"react-i18next": "^15.0.2",
"react-icons": "^5.3.0",
"react-loader-spinner": "^6.1.6",
"react-markdown": "^9.0.1",
Expand All @@ -76,53 +76,53 @@
"yup": "^1.4.0"
},
"devDependencies": {
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
"@storybook/addon-mdx-gfm": "^8.2.9",
"@storybook/addon-essentials": "^8.3.2",
"@storybook/addon-interactions": "^8.3.2",
"@storybook/addon-links": "^8.3.2",
"@storybook/addon-mdx-gfm": "^8.3.2",
"@storybook/blocks": "^8.2.9",
"@storybook/nextjs": "^8.2.9",
"@storybook/react": "^8.2.9",
"@storybook/nextjs": "^8.3.2",
"@storybook/react": "^8.3.2",
"@storybook/testing-library": "^0.2.2",
"@svgr/webpack": "^8.1.0",
"@tailwindcss/forms": "^0.5.9",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.13",
"@types/js-cookie": "^3.0.6",
"@types/node-fetch": "^2.6.11",
"@types/prop-types": "^15.7.12",
"@types/react": "^18.3.5",
"@types/react": "^18.3.8",
"@types/react-headroom": "^3.2.3",
"@types/react-simple-maps": "^3.0.6",
"@types/react-syntax-highlighter": "^15.5.13",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.9.1",
"eslint-config-next": "^14.2.8",
"eslint": "^9.11.0",
"eslint-config-next": "^14.2.13",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-unused-imports": "^4.1.3",
"eslint-plugin-unused-imports": "^4.1.4",
"globals": "^15.9.0",
"husky": "^9.1.5",
"husky": "^9.1.6",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.2.10",
"next-router-mock": "^0.9.13",
"next-sitemap": "^4.2.3",
"postcss": "^8.4.45",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
"storybook": "^8.2.9",
"tailwindcss": "^3.4.10",
"typescript": "^5.5.4"
"storybook": "^8.3.2",
"tailwindcss": "^3.4.12",
"typescript": "^5.6.2"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
Expand Down
15 changes: 15 additions & 0 deletions src/components/organisms/about/TravelMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as am5 from '@amcharts/amcharts5';
import * as am5map from '@amcharts/amcharts5/map';
import Am5themes_Animated from '@amcharts/amcharts5/themes/Animated';
import Am5themes_Dark from '@amcharts/amcharts5/themes/Dark';
import am5geodata_canadaLow from '@amcharts/amcharts5-geodata/canadaLow';
import am5geodata_italyLow from '@amcharts/amcharts5-geodata/italyLow';
import am5geodata_ukLow from '@amcharts/amcharts5-geodata/ukLow';
import am5geodata_usaLow from '@amcharts/amcharts5-geodata/usaLow';
Expand All @@ -12,6 +13,7 @@ import { useTheme } from 'next-themes';
import { useLayoutEffect } from 'react';

import {
canadaStatesVisited,
citiesVisited,
countriesVisited,
italyVisitedRegions,
Expand Down Expand Up @@ -80,6 +82,15 @@ const TravelMap = () => {
}),
);

const canadaVisitedSeries = chart.series.push(
am5map.MapPolygonSeries.new(root, {
geoJSON: am5geodata_canadaLow,
include: canadaStatesVisited.map((state) => state.id),
fill: am5.color(visitedRegionColor),
opacity: 0.9,
}),
);

const italyVisitedSeries = chart.series.push(
am5map.MapPolygonSeries.new(root, {
geoJSON: am5geodata_italyLow,
Expand Down Expand Up @@ -166,6 +177,10 @@ const TravelMap = () => {
tooltipText: '{name}',
});

canadaVisitedSeries.mapPolygons.template.setAll({
tooltipText: '{name}',
});

return () => {
root.dispose();
};
Expand Down
6 changes: 3 additions & 3 deletions src/data/about/randomFacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
},
{
"name": "Countries visited",
"headline": "I have visited a total of 21 countries so far 🗺️",
"description": "I have visited a total of 21 countries so far 🗺️ \n\nThe full list is: Austria, Belgium, China, France, Germany, Iceland, Ireland, Italy, Malta, Monaco, the Netherlands, Poland, Portugal, Russia, San Marino, Slovakia, Spain, Switzerland, United Kingdom, United States, Vatican City.",
"headline": "I have visited a total of 24 countries so far 🗺️",
"description": "I have visited a total of 24 countries so far 🗺️ \n\nThe full list is: Austria, Belgium, Canada, China, Denmark, France, Germany, Iceland, Ireland, Italy, Malta, Monaco, the Netherlands, Poland, Portugal, Russia, San Marino, Slovakia, Spain, Sweden, Switzerland, United Kingdom, United States, Vatican City.",
"isFactTrue": true,
"explanation": "Correct! The full list is: Austria, Belgium, China, France, Germany, Iceland, Ireland, Italy, Malta, Monaco, the Netherlands, Poland, Portugal, Russia, San Marino, Slovakia, Spain, Switzerland, United Kingdom, United States, Vatican City."
"explanation": "Correct! The full list is: Austria, Belgium, Canada, China, Denmark, France, Germany, Iceland, Ireland, Italy, Malta, Monaco, the Netherlands, Poland, Portugal, Russia, San Marino, Slovakia, Spain, Sweden, Switzerland, United Kingdom, United States, Vatican City."
},
{
"name": "Rent",
Expand Down
28 changes: 28 additions & 0 deletions src/data/about/travel/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ export const countriesVisited = [
title: 'Belgium',
id: 'BE',
},
{
title: 'Canada',
id: 'CA',
},
{
title: 'China',
id: 'CN',
},
{
title: 'Denmark',
id: 'DK',
},
{
title: 'France',
id: 'FR',
Expand Down Expand Up @@ -67,6 +75,10 @@ export const countriesVisited = [
title: 'Spain',
id: 'ES',
},
{
title: 'Sweden',
id: 'SE',
},
{
title: 'Switzerland',
id: 'CH',
Expand Down Expand Up @@ -110,6 +122,10 @@ export const usStatesVisited = [
name: 'Maryland',
id: 'US-MD',
},
{
name: 'Massachusetts',
id: 'US-MA',
},
{
name: 'New Jersey',
id: 'US-NJ',
Expand Down Expand Up @@ -144,6 +160,13 @@ export const usStatesVisited = [
},
];

export const canadaStatesVisited = [
{
name: 'Ontario',
id: 'CA-ON',
},
];

export const italyVisitedRegions = [
{
name: 'Campania',
Expand Down Expand Up @@ -221,9 +244,11 @@ export const citiesVisited = [
{ name: 'Birmingham', lat: 52.4862, lon: -1.8904 },
{ name: 'Bologna', lat: 44.4949, lon: 11.3426 },
{ name: 'Bolzano', lat: 46.4907, lon: 11.3399 },
{ name: 'Boston', lat: 42.3601, lon: -71.0589 },
{ name: 'Bratislava', lat: 48.1486, lon: 17.1077 },
{ name: 'Brussels', lat: 50.8503, lon: 4.3517 },
{ name: 'Charleston', lat: 32.7765, lon: -79.9311 },
{ name: 'Copenhagen', lat: 55.6761, lon: 12.2683 },
{ name: 'Dijon', lat: 47.3301, lon: 5.048 },
{ name: 'Dublin', lat: 53.3498, lon: -6.2603 },
{ name: 'Edinburgh', lat: 55.9533, lon: -3.1883 },
Expand All @@ -245,13 +270,15 @@ export const citiesVisited = [
{ name: 'Lyon', lat: 45.764, lon: 4.8357 },
{ name: 'Madrid', lat: 40.4168, lon: -3.7038 },
{ name: 'Malaga', lat: 36.7212, lon: -4.4213 },
{ name: 'Malmö', lat: 55.605, lon: 13.1638 },
{ name: 'Manchester', lat: 53.4808, lon: -2.2426 },
{ name: 'Milan', lat: 45.4642, lon: 9.19 },
{ name: 'Monaco', lat: 43.7384, lon: 7.4246 },
{ name: 'Moscow', lat: 55.7558, lon: 37.6176 },
{ name: 'Munich', lat: 48.1351, lon: 11.582 },
{ name: 'Naples', lat: 40.8518, lon: 14.2681 },
{ name: 'New York', lat: 40.7591, lon: -74.0516 },
{ name: 'Niagara Falls', lat: 43.0896, lon: -79.0849 },
{ name: 'Nice', lat: 43.7102, lon: 7.262 },
{ name: 'Orlando', lat: 28.5383, lon: -81.3792 },
{ name: 'Panama City', lat: 30.2038, lon: -85.6858 },
Expand All @@ -270,6 +297,7 @@ export const citiesVisited = [
{ name: 'Shanghai', lat: 31.2304, lon: 121.4737 },
{ name: 'Strasbourg', lat: 48.5734, lon: 7.7521 },
{ name: 'Toulouse', lat: 43.06124, lon: 1.5661 },
{ name: 'Toronto', lat: 43.6532, lon: -79.3832 },
{ name: 'Turin', lat: 45.0703, lon: 7.6869 },
{ name: 'Valencia', lat: 39.4699, lon: -0.3763 },
{ name: 'Valletta', lat: 35.8989, lon: 14.5146 },
Expand Down
Loading

0 comments on commit 7fe1dd3

Please sign in to comment.