feat: mock all demo widgets
This commit is contained in:
1 parent
e7c8e2e01e
commit
71c328cd7a
49 files changed
+1008
-170
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { getSafeAppHref, getSafeApplicationUrl } from "@homarr/common";
|
||||
|
||||
export const getSafeIframeUrl = (url: unknown) => {
|
||||
const applicationUrl = getSafeApplicationUrl(url);
|
||||
if (applicationUrl) return applicationUrl;
|
||||
|
||||
const relativeUrl = getSafeAppHref(url);
|
||||
if (relativeUrl?.startsWith("/") && !relativeUrl.startsWith("//")) return relativeUrl;
|
||||
return undefined;
|
||||
};
|
||||
Reference in new issue
Block a user