-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Change the old Webinar promote bar to the new one and update so…
…me eslint rules (#232) * feat: add react-hook plugin to eslint * ref: change take a tour structure and labels * ESLint formatting * Adding a space at the end --------- Co-authored-by: Travis Jenkins <[email protected]>
- Loading branch information
1 parent
2cadcdc
commit 2d1e709
Showing
8 changed files
with
454 additions
and
547 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
import React, { useCallback, useEffect, useState } from 'react'; | ||
|
||
import CloseIcon from '@mui/icons-material/Close'; | ||
|
||
import { Button, Container, Link } from './styles'; | ||
|
||
const STORAGE_NAME = '@estuary/closeTour'; | ||
|
||
const TakeATour = () => { | ||
const [closeTour, setCloseTour] = useState(true); | ||
|
||
const onClick = useCallback(() => { | ||
localStorage.setItem(STORAGE_NAME, '1'); | ||
setCloseTour(true); | ||
}, []); | ||
|
||
useEffect(() => { | ||
if (typeof window !== 'undefined') setCloseTour(!!localStorage.getItem(STORAGE_NAME)); | ||
}, []); | ||
|
||
if (closeTour) return null; | ||
|
||
return ( | ||
<Container> | ||
<Link target="_blank" href="https://try.estuary.dev/how-to-build-an-ai-pipeline/"> | ||
"How to Build Pipelines for Gen AI" - Join our April 10th webinar | ||
</Link> | ||
<Button onClick={onClick}> | ||
<CloseIcon color="inherit" fontSize="small" /> | ||
</Button> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default TakeATour; |
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,34 @@ | ||
import styled from 'styled-components'; | ||
|
||
import IconButton from '@mui/material/IconButton'; | ||
import { OutboundLink } from '../OutboundLink'; | ||
|
||
export const Container = styled.div` | ||
background-color: #5072eb; | ||
height: 24px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
position: fixed; | ||
top: 0; | ||
width: 100%; | ||
z-index: 99999; | ||
display: none; | ||
font-weight: 700; | ||
@media (min-width: 1024px) { | ||
display: flex; | ||
} | ||
`; | ||
|
||
export const Link = styled(OutboundLink)` | ||
font-size: 12px; | ||
text-decoration-line: underline; | ||
color: #fff; | ||
`; | ||
|
||
export const Button = styled(IconButton)` | ||
color: #fff; | ||
position: absolute; | ||
right: 5px; | ||
`; |
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