Cleanup + migrate away from process.browser (#5408)
* Cleanup + migrate away from process.browser * Bring back HeadSeo in ui/v2
This commit is contained in:
1 parent
7e19e0d9e2
commit
8b5d57c573
3 files changed
+3
-23
No files matched your search
@@ -1,20 +0,0 @@
|
||||
type BrowserInfo = {
|
||||
url: string;
|
||||
path: string;
|
||||
referrer: string;
|
||||
title: string;
|
||||
query: string;
|
||||
};
|
||||
|
||||
export const getBrowserInfo = (): Partial<BrowserInfo> => {
|
||||
if (!process.browser) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
url: window.document.location?.href ?? undefined,
|
||||
path: window.document.location?.pathname ?? undefined,
|
||||
referrer: window.document?.referrer ?? undefined,
|
||||
title: window.document.title ?? undefined,
|
||||
query: window.document.location?.search,
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user