-
-
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.
(dashboard): 💅 Add access to v1 banner
- Loading branch information
1 parent
56bd5fa
commit 1fbe324
Showing
3 changed files
with
50 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Flex, HStack, StackProps } from '@chakra-ui/layout' | ||
import { CloseButton } from '@chakra-ui/react' | ||
import React, { useEffect, useState } from 'react' | ||
|
||
type VerifyEmailBannerProps = { id: string } & StackProps | ||
|
||
export const Banner = ({ id, ...props }: VerifyEmailBannerProps) => { | ||
const [show, setShow] = useState(false) | ||
const localStorageKey = `banner-${id}` | ||
|
||
useEffect(() => { | ||
if (!localStorage.getItem(localStorageKey)) setShow(true) | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []) | ||
|
||
const handleCloseClick = () => { | ||
localStorage.setItem(localStorageKey, 'hide') | ||
setShow(false) | ||
} | ||
|
||
if (!show) return <></> | ||
return ( | ||
<HStack | ||
h="50px" | ||
bgColor="blue.400" | ||
color="white" | ||
justifyContent="center" | ||
align="center" | ||
w="full" | ||
{...props} | ||
> | ||
<Flex maxW="1000px" justifyContent="space-between" w="full"> | ||
<HStack>{props.children}</HStack> | ||
<CloseButton rounded="full" onClick={handleCloseClick} /> | ||
</Flex> | ||
</HStack> | ||
) | ||
} |
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
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
1fbe324
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
typebot-viewer.vercel.app
viewer-v2-typebot-io.vercel.app
viewer-v2-git-main-typebot-io.vercel.app
1fbe324
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
landing-page-v2-git-main-typebot-io.vercel.app
landing-page-v2-jade.vercel.app
landing-page-v2-typebot-io.vercel.app
1fbe324
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
builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
next.typebot.io