Skip to content

Commit

Permalink
Fixed path alias.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Aug 22, 2023
1 parent 800731f commit 51014f6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"compilerOptions": {
"baseUrl": "./src"
"baseUrl": "./src",
"paths": {
"public/*": ["./public/*"]
}
}
}
2 changes: 1 addition & 1 deletion src/components/hooks/useCountryNames.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { httpGet } from 'next-basics';
import enUS from '../../../public/intl/country/en-US.json';
import enUS from 'public/intl/country/en-US.json';

const countryNames = {
'en-US': enUS,
Expand Down
2 changes: 1 addition & 1 deletion src/components/hooks/useLanguageNames.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { httpGet } from 'next-basics';
import enUS from '../../../public/intl/country/en-US.json';
import enUS from 'public/intl/country/en-US.json';

const languageNames = {
'en-US': enUS,
Expand Down
2 changes: 1 addition & 1 deletion src/components/hooks/useLocale.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LOCALE_CONFIG } from 'lib/constants';
import { getDateLocale, getTextDirection } from 'lib/lang';
import useStore, { setLocale } from 'store/app';
import useForceUpdate from 'components/hooks/useForceUpdate';
import enUS from '../../../public/intl/country/en-US.json';
import enUS from 'public/intl/country/en-US.json';

const messages = {
'en-US': enUS,
Expand Down
2 changes: 1 addition & 1 deletion src/components/metrics/RegionsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useLocale from 'components/hooks/useLocale';
import useMessages from 'components/hooks/useMessages';
import useCountryNames from 'components/hooks/useCountryNames';
import MetricsTable from './MetricsTable';
import regions from '../../../public/iso-3166-2.json';
import regions from 'public/iso-3166-2.json';

export function RegionsTable({ websiteId, ...props }) {
const { locale } = useLocale();
Expand Down

0 comments on commit 51014f6

Please sign in to comment.