2
0

Add an update notification popup

Appears when a new version of Typebot is available

Closes #312
This commit is contained in:
Baptiste Arnaud
2023-02-15 18:05:19 +01:00
parent 435edd03c0
commit 8ac3784c0f
5 changed files with 111 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import { toTitleCase } from 'utils'
import { Session } from 'next-auth'
import { Plan } from 'db'
import { trpc } from '@/lib/trpc'
import { NewVersionPopup } from '@/components/NewVersionPopup'
const { ToastContainer, toast } = createStandaloneToast(customTheme)
@ -59,12 +60,14 @@ const App = ({
<WorkspaceProvider typebotId={typebotId}>
<Component />
<SupportBubble />
<NewVersionPopup />
</WorkspaceProvider>
</TypebotProvider>
) : (
<WorkspaceProvider>
<Component {...pageProps} />
<SupportBubble />
<NewVersionPopup />
</WorkspaceProvider>
)}
</UserProvider>

View File

@ -0,0 +1,7 @@
import { NextApiRequest, NextApiResponse } from 'next'
const handler = async (_req: NextApiRequest, res: NextApiResponse) => {
return res.send({ commitSha: process.env.VERCEL_GIT_COMMIT_SHA })
}
export default handler