mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 23:33:37 +01:00
Fix websites check.
This commit is contained in:
parent
52456429f6
commit
1e8c1d0d18
@ -29,7 +29,7 @@ const TYPE_ICONS = {
|
|||||||
[TYPE_EVENT]: <Bolt />,
|
[TYPE_EVENT]: <Bolt />,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function RealtimeLog({ data, websites }) {
|
export default function RealtimeLog({ data, websites, websiteId }) {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const [locale] = useLocale();
|
const [locale] = useLocale();
|
||||||
const countryNames = useCountryNames(locale);
|
const countryNames = useCountryNames(locale);
|
||||||
@ -161,7 +161,9 @@ export default function RealtimeLog({ data, websites }) {
|
|||||||
<Icon className={styles.icon} icon={getIcon(row)} />
|
<Icon className={styles.icon} icon={getIcon(row)} />
|
||||||
{getDetail(row)}
|
{getDetail(row)}
|
||||||
</div>
|
</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>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -64,7 +64,7 @@ export default function RealtimeViews({ websiteId, data, websites }) {
|
|||||||
pageviews
|
pageviews
|
||||||
.reduce((arr, { url, website_id }) => {
|
.reduce((arr, { url, website_id }) => {
|
||||||
if (url?.startsWith('/')) {
|
if (url?.startsWith('/')) {
|
||||||
if (!websiteId && websites.length > 0) {
|
if (!websiteId && websites.length > 1) {
|
||||||
url = `${getDomain(website_id)}${url}`;
|
url = `${getDomain(website_id)}${url}`;
|
||||||
}
|
}
|
||||||
const row = arr.find(({ x }) => x === url);
|
const row = arr.find(({ x }) => x === url);
|
||||||
|
@ -135,7 +135,7 @@ export default function RealtimeDashboard() {
|
|||||||
<RealtimeViews websiteId={websiteId} data={realtimeData} websites={websites} />
|
<RealtimeViews websiteId={websiteId} data={realtimeData} websites={websites} />
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
<GridColumn xs={12} lg={8}>
|
<GridColumn xs={12} lg={8}>
|
||||||
<RealtimeLog data={realtimeData} websites={websites} />
|
<RealtimeLog websiteId={websiteId} data={realtimeData} websites={websites} />
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
</GridRow>
|
</GridRow>
|
||||||
<GridRow>
|
<GridRow>
|
||||||
|
Loading…
Reference in New Issue
Block a user