-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(dashboard): 📝 Add 2.0 annoucement modal
- Loading branch information
1 parent
c502bbb
commit ab9c55e
Showing
4 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
70 changes: 70 additions & 0 deletions
70
apps/builder/components/dashboard/annoucements/AnnoucementModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { | ||
Modal, | ||
ModalOverlay, | ||
ModalContent, | ||
ModalHeader, | ||
ModalCloseButton, | ||
ModalBody, | ||
Text, | ||
Stack, | ||
Link, | ||
} from '@chakra-ui/react' | ||
import React, { useEffect, useState } from 'react' | ||
|
||
type Props = { | ||
isOpen: boolean | ||
onClose: () => void | ||
} | ||
|
||
const localStorageKey = 'typebot-20-modal' | ||
export const AnnoucementModal = ({ isOpen, onClose }: Props) => { | ||
const [show, setShow] = useState(false) | ||
|
||
useEffect(() => { | ||
if (!localStorage.getItem(localStorageKey)) setShow(true) | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []) | ||
|
||
const handleCloseClick = () => { | ||
localStorage.setItem(localStorageKey, 'hide') | ||
setShow(false) | ||
onClose() | ||
} | ||
|
||
if (!show) return <></> | ||
return ( | ||
<Modal isOpen={isOpen} onClose={handleCloseClick} size="2xl"> | ||
<ModalOverlay /> | ||
<ModalContent> | ||
<ModalHeader>What's new in Typebot 2.0?</ModalHeader> | ||
<ModalCloseButton /> | ||
<ModalBody as={Stack} spacing="6" pb="10"> | ||
<Text>Typebo 2.0 has been launched February the 15th 🎉.</Text> | ||
<iframe | ||
width="620" | ||
height="315" | ||
src="https://www.youtube.com/embed/u8FZHvlYviw" | ||
title="YouTube video player" | ||
frameBorder="0" | ||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" | ||
allowFullScreen | ||
style={{ borderRadius: '5px' }} | ||
/> | ||
<Text> | ||
Most questions are answered in this{' '} | ||
<Link | ||
href="https://docs.typebot.io" | ||
color="blue.500" | ||
textDecor="underline" | ||
> | ||
FAQ | ||
</Link> | ||
. If you have other questions, open up the bot on the bottom right | ||
corner. 😃 | ||
</Text> | ||
<Text>Baptiste.</Text> | ||
</ModalBody> | ||
</ModalContent> | ||
</Modal> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ab9c55e
There was a problem hiding this comment.
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:
docs – ./apps/docs
docs-typebot-io.vercel.app
docs-git-main-typebot-io.vercel.app
docs.typebot.io
ab9c55e
There was a problem hiding this comment.
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
app.typebot.io
builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
ab9c55e
There was a problem hiding this comment.
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:
viewer-v2 – ./apps/viewer
viewer-v2-git-main-typebot-io.vercel.app
typebot-viewer.vercel.app
viewer-v2-typebot-io.vercel.app
ab9c55e
There was a problem hiding this comment.
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:
landing-page-v2 – ./apps/landing-page
typebot.io
get-typebot.com
landing-page-v2-typebot-io.vercel.app
landing-page-v2-git-main-typebot-io.vercel.app
www.typebot.io
www.get-typebot.com