Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup + migrate away from process.browser #5408

Merged
merged 3 commits into from Nov 8, 2022

Conversation

emrysal
Copy link
Contributor

@emrysal emrysal commented Nov 7, 2022

What does this PR do?

@vercel
Copy link

vercel bot commented Nov 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
cal ❌ Failed (Inspect) Nov 8, 2022 at 1:41AM (UTC)

@what-the-diff
Copy link

what-the-diff bot commented Nov 7, 2022

  • Moved browser.utils from apps/web to packages
  • Removed head-seo component in ui v2 package as it is not used anymore

@emrysal emrysal marked this pull request as ready for review November 8, 2022 01:34
@@ -7,7 +7,7 @@ type BrowserInfo = {
};

export const getBrowserInfo = (): Partial<BrowserInfo> => {
if (!process.browser) {
if (typeof window === "undefined") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it might make sense to add a small util isBrowser()? Makes that we have this logic only in one place, and also reads a bit easier. The change from NOT to now strict equals almost threw me off thinking it was reverted 😁

@emrysal emrysal merged commit 8b5d57c into main Nov 8, 2022
@emrysal emrysal deleted the techdebt/process-browser-deprecation branch November 8, 2022 07:37
haffla pushed a commit to tourlane/cal.com that referenced this pull request Nov 22, 2022
* Cleanup + migrate away from process.browser

* Bring back HeadSeo in ui/v2
@PeerRich PeerRich added the core area: core, team members only label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

process.browser is deprecated and browser.utils.ts is duplicated
3 participants