chore(deps): update dependency tsx to v4.11.0 (#537)
* chore(deps): update dependency tsx to v4.11.0 * fix: build not working --------- Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com> Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
committed by
GitHub
parent
98ebabc9ca
commit
0ccf258a90
@@ -4,9 +4,10 @@ import { UMAMI_WEBSITE_ID } from "@homarr/analytics";
|
||||
import { api } from "@homarr/api/server";
|
||||
|
||||
export const Analytics = async () => {
|
||||
const analytics = await api.serverSettings.getAnalytics();
|
||||
// For static pages it will not find any analytics data so we do not include the script on them
|
||||
const analytics = await api.serverSettings.getAnalytics().catch(() => null);
|
||||
|
||||
if (analytics.enableGeneral) {
|
||||
if (analytics?.enableGeneral) {
|
||||
return <Script src="https://umami.homarr.dev/script.js" data-website-id={UMAMI_WEBSITE_ID} defer />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user