diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3076001..be63f93 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,6 +35,9 @@ jobs: restore-keys: | ${{runner.os}}-yarn- + - name: Add secret to '.npmrc' file + run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.COMPLEX_CELERY_CI }}" > ~/.npmrc + - name: Install run: yarn install --frozen-lockfile @@ -68,9 +71,9 @@ jobs: - name: Add to codecov uses: codecov/codecov-action@v2 - - name: Deploy to Heroku - uses: akhileshns/heroku-deploy@v3.12.12 - with: - heroku_api_key: ${{ secrets.HEROKU_API_KEY }} - heroku_app_name: 'complex-celery-github' - heroku_email: 'michael2.gray@gmail.com' + # - name: Deploy to Heroku + # uses: akhileshns/heroku-deploy@v3.12.12 + # with: + # heroku_api_key: ${{ secrets.HEROKU_API_KEY }} + # heroku_app_name: 'complex-celery-github' + # heroku_email: 'michael2.gray@gmail.com' diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..6a528d7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@michael2gray:registry=https://npm.pkg.github.com/ \ No newline at end of file diff --git a/package.json b/package.json index e4cfbe0..d57c34a 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "**/*": "prettier --write --ignore-unknown" }, "dependencies": { + "@michael2gray/valhalla": "1.11.0", "axios": "^0.24.0", "clsx": "^1.1.1", "date-fns": "^2.28.0", diff --git a/src/app/modules/city/routes/city.route.tsx b/src/app/modules/city/routes/city.route.tsx index 9facfad..acba67e 100644 --- a/src/app/modules/city/routes/city.route.tsx +++ b/src/app/modules/city/routes/city.route.tsx @@ -17,17 +17,16 @@ export const CityRoute = () => { return ( - {(state) => { - const isoCode = state?.isoCode ?? DEFAULT_ISO_CODE; - - return ( - - - - - - ); - }} + {(state) => ( + + + + + + )} ); diff --git a/src/app/modules/country/utils/country.util.ts b/src/app/modules/country/utils/country.util.ts index 690e5df..4afb1ce 100644 --- a/src/app/modules/country/utils/country.util.ts +++ b/src/app/modules/country/utils/country.util.ts @@ -35,17 +35,17 @@ export const getKnownNullCountry = (city: string): string => { export const getCountriesFromCities = ( cities: City[] ): Omit[] => { - const citiesByCountry = _groupBy(cities, 'country'); + const CITIES_BY_COUNTRY = _groupBy(cities, 'country'); - const countries: Omit[] = []; + const COUNTRIES: Omit[] = []; - for (const [key, value] of Object.entries(citiesByCountry)) { - countries.push({ + for (const [key, value] of Object.entries(CITIES_BY_COUNTRY)) { + COUNTRIES.push({ name: key, cities: value, coords: COUNTRY_LAT_LNGS[key], }); } - return _orderBy(countries, 'name'); + return _orderBy(COUNTRIES, 'name'); }; diff --git a/yarn.lock b/yarn.lock index 0841fe0..dbaa97f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1592,6 +1592,11 @@ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== +"@michael2gray/valhalla@1.11.0": + version "1.11.0" + resolved "https://npm.pkg.github.com/download/@michael2gray/valhalla/1.11.0/47c1c8f3a92756a10e59c1c0487d04402efc7f7b183c70998f9a83beaf4145f6#ff2152539e9adb2ff23e24fdf340850f638e28b2" + integrity sha512-gbYGfke/C4mNdam7a75/E92G+P8yxU60tvV4I+lTl4FQdElWpi2xBXKt5qQSQqSjKJxk2SEzkLsIcq+ZF3TIpQ== + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"