mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
New website nav menu.
This commit is contained in:
parent
f9d09c8b54
commit
f834ff3db4
10 changed files with 47 additions and 9 deletions
|
|
@ -1,13 +1,15 @@
|
|||
import MetricsTable from './MetricsTable';
|
||||
import { useRouter } from 'next/router';
|
||||
import FilterLink from 'components/common/FilterLink';
|
||||
import useCountryNames from 'hooks/useCountryNames';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
import MetricsTable from './MetricsTable';
|
||||
|
||||
export function CountriesTable({ websiteId, ...props }) {
|
||||
const { locale } = useLocale();
|
||||
const countryNames = useCountryNames(locale);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { basePath } = useRouter();
|
||||
|
||||
function renderLink({ x: code }) {
|
||||
return (
|
||||
|
|
@ -17,7 +19,7 @@ export function CountriesTable({ websiteId, ...props }) {
|
|||
value={countryNames[code] && code}
|
||||
label={countryNames[code]}
|
||||
>
|
||||
<img src={`/images/flags/${code?.toLowerCase() || 'xx'}.png`} alt={code} />
|
||||
<img src={`${basePath}/images/flags/${code?.toLowerCase() || 'xx'}.png`} alt={code} />
|
||||
</FilterLink>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue