mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Fix websites check.
This commit is contained in:
parent
52456429f6
commit
1e8c1d0d18
3 changed files with 6 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ const TYPE_ICONS = {
|
|||
[TYPE_EVENT]: <Bolt />,
|
||||
};
|
||||
|
||||
export default function RealtimeLog({ data, websites }) {
|
||||
export default function RealtimeLog({ data, websites, websiteId }) {
|
||||
const intl = useIntl();
|
||||
const [locale] = useLocale();
|
||||
const countryNames = useCountryNames(locale);
|
||||
|
|
@ -161,7 +161,9 @@ export default function RealtimeLog({ data, websites }) {
|
|||
<Icon className={styles.icon} icon={getIcon(row)} />
|
||||
{getDetail(row)}
|
||||
</div>
|
||||
{websites.length > 0 && <div className={styles.website}>{getWebsite(row)?.domain}</div>}
|
||||
{!websiteId && websites.length > 1 && (
|
||||
<div className={styles.website}>{getWebsite(row)?.domain}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export default function RealtimeViews({ websiteId, data, websites }) {
|
|||
pageviews
|
||||
.reduce((arr, { url, website_id }) => {
|
||||
if (url?.startsWith('/')) {
|
||||
if (!websiteId && websites.length > 0) {
|
||||
if (!websiteId && websites.length > 1) {
|
||||
url = `${getDomain(website_id)}${url}`;
|
||||
}
|
||||
const row = arr.find(({ x }) => x === url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue