Skip to content

Commit

Permalink
fix(editor): 🐛 Overflow issue on Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 4, 2022
1 parent 6867143 commit 56f1d5f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/builder/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useEffect } from 'react'
import { AppProps } from 'next/app'
import { SessionProvider } from 'next-auth/react'
import { ChakraProvider } from '@chakra-ui/react'
Expand All @@ -22,7 +22,13 @@ if (process.env.NEXT_PUBLIC_E2E_TEST === 'enabled') enableMocks()

const App = ({ Component, pageProps: { session, ...pageProps } }: AppProps) => {
useRouterProgressBar()
const { query } = useRouter()
const { query, pathname } = useRouter()

useEffect(() => {
pathname.endsWith('/edit')
? (document.body.style.overflow = 'hidden')
: (document.body.style.overflow = 'auto')
}, [pathname])

const typebotId = query.typebotId?.toString()
return (
Expand Down

4 comments on commit 56f1d5f

@vercel
Copy link

@vercel vercel bot commented on 56f1d5f Apr 4, 2022

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 56f1d5f Apr 4, 2022

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 56f1d5f Apr 4, 2022

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 56f1d5f Apr 4, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app
app.typebot.io

Please sign in to comment.