diff --git a/packages/lib-user/src/components/UserHome/UserHome.js b/packages/lib-user/src/components/UserHome/UserHome.js index c9bcefad83..3dc15eb20e 100644 --- a/packages/lib-user/src/components/UserHome/UserHome.js +++ b/packages/lib-user/src/components/UserHome/UserHome.js @@ -8,7 +8,6 @@ import DashboardContainer from './components/Dashboard/DashboardContainer.js' import RecentProjectsContainer from './components/RecentProjects/RecentProjectsContainer.js' import RecentSubjectsContainer from './components/RecentSubjects/RecentSubjectsContainer.js' import MyGroupsContainer from '../MyGroups/MyGroupsContainer.js' -import WelcomeModal from './components/WelcomeModal/WelcomeModal.js' const StyledGrid = styled(Grid)` grid-template-columns: 1fr 1fr; @@ -23,7 +22,6 @@ function UserHome({ authUser, dailyZooPosts = [], zooBlogPosts = [] }) { return ( - diff --git a/packages/lib-user/src/components/UserHome/components/Dashboard/Dashboard.js b/packages/lib-user/src/components/UserHome/components/Dashboard/Dashboard.js index 9193675331..c774998248 100644 --- a/packages/lib-user/src/components/UserHome/components/Dashboard/Dashboard.js +++ b/packages/lib-user/src/components/UserHome/components/Dashboard/Dashboard.js @@ -4,8 +4,7 @@ import { Chat, Favorite, FormNext, - MailOption, - Share + MailOption } from 'grommet-icons' import { useContext } from 'react' import styled, { css, useTheme } from 'styled-components' @@ -16,26 +15,6 @@ import DashboardLink from './components/DashboardLink.js' import StatsTabsContainer from './components/StatsTabs/StatsTabsContainer.js' import Link from 'next/link' -const LinkToBlogPost = styled(Anchor)` - position: absolute; - top: 15px; - right: 15px; - background: white; - border: ${props => props.theme.global.colors['dark-5']} 1px solid; - border-radius: 24px; - padding: 10px 15px; - font-size: 0.8rem; - display: flex; - align-items: center; - - // For Grommet breakpoint small - @media (width < 769px) { - border-radius: 16px; - font-size: 0.6rem; - padding: 8px 10px; - } -` - const Relative = styled(Box)` position: relative; ` @@ -114,20 +93,6 @@ const StyledStatsLink = styled(Anchor)` } ` -const StyledBadge = styled(Text)` - position: absolute; - right: 10px; - top: -12px; - padding: 3px 5px; - background: ${props => props.theme.global.colors['neutral-1']}; - border-radius: 15px; - - // For Grommet breakpoint small - @media (width < 769px) { - right: 60px; - } -` - // Same as ContentBox const border = { color: { @@ -142,11 +107,6 @@ export default function Dashboard({ user, userLoading }) { const size = useContext(ResponsiveContext) const { dark } = useTheme() - const blogLinkLabel = - size === 'small' - ? 'About your homepage' - : 'Learn more about your new homepage' - return ( - - {blogLinkLabel} - - } - /> - - - NEW - diff --git a/packages/lib-user/src/components/UserHome/components/WelcomeModal/README.md b/packages/lib-user/src/components/UserHome/components/WelcomeModal/README.md deleted file mode 100644 index 24f188d239..0000000000 --- a/packages/lib-user/src/components/UserHome/components/WelcomeModal/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# WelcomeModal - -This modal is intended for use only during the first few weeks post-launch of the new homepages. It has a link to the relevant blog post, but is also dismissible via the close button, or the "take me there!" call to action. It uses local storage so when dismissed, it stays hidden across browser tabs. When no longer needed, please feel free to delete this code. diff --git a/packages/lib-user/src/components/UserHome/components/WelcomeModal/WelcomeModal.js b/packages/lib-user/src/components/UserHome/components/WelcomeModal/WelcomeModal.js deleted file mode 100644 index 107950b991..0000000000 --- a/packages/lib-user/src/components/UserHome/components/WelcomeModal/WelcomeModal.js +++ /dev/null @@ -1,164 +0,0 @@ -import { Anchor, Box, Button, Layer, Paragraph, ResponsiveContext } from 'grommet' -import { - CloseButton, - SpacedText, - ZooniverseLogo -} from '@zooniverse/react-components' -import { useContext, useEffect, useState } from 'react' -import styled from 'styled-components' - -const textColor = { light: 'black', dark: 'white' } - -const StyledAnchor = styled(Anchor)` - width: max-content; - height: max-content; - border-radius: 5px; - font-size: 1rem; - padding: 8px; - text-align: center; - color: white; - font-weight: normal; - background-color: ${props => props.theme.global.colors['neutral-1']}; - - &:hover { - text-decoration: none; - } -` - -const StyledDismiss = styled(Button)` - width: max-content; - height: max-content; - border-radius: 5px; - border: solid 1px ${props => props.theme.global.colors.brand}; - font-size: 1rem; - padding: 8px; - text-align: center; - - &:hover { - text-decoration: none; - } -` - -const StyledCloseButton = styled(CloseButton)` - position: absolute; - top: 10px; - right: 10px; -` - -function WelcomeModal() { - const size = useContext(ResponsiveContext) - const [dismissed, setDismissed] = useState(true) - - useEffect(() => { - if (window.localStorage) { - const modalDismissed = - window.localStorage.getItem('welcome-modal-dismissed') === 'true' - if (modalDismissed) setDismissed(true) - else setDismissed(false) - } - }, []) - - const handleClose = () => { - window.localStorage?.setItem('welcome-modal-dismissed', 'true') - setDismissed(true) - } - - return ( - <> - {!dismissed ? ( - - - - - - Welcome to your new homepage experience! - - - It's been a while since we updated the homepage, so we've - freshened things up. This has also let us improve: - - - - Statistics - More accurate and detailed - personal stats. Check them out to get a feel for your - participation across Zooniverse. - - - Volunteer Certificates - We’ve had many - requests for certificates over the years. If you want, now you - can show off what you’ve done, use the certificates to fulfill - service hour requirements, and more. - - - Group Engagement - A new way to create and - share group goals and tell the story of your collective impact. - - - Navigation - Enjoy an easier flow, including - simply clicking the Zooniverse logo on any page to return here - to your homepage. - - - - - Read about the changes - - - Great, take me there! - - - - - ) : null} - - ) -} - -export default WelcomeModal diff --git a/packages/lib-user/src/components/UserHome/components/WelcomeModal/WelcomeModal.stories.js b/packages/lib-user/src/components/UserHome/components/WelcomeModal/WelcomeModal.stories.js deleted file mode 100644 index ef60fa9310..0000000000 --- a/packages/lib-user/src/components/UserHome/components/WelcomeModal/WelcomeModal.stories.js +++ /dev/null @@ -1,8 +0,0 @@ -import WelcomeModal from './WelcomeModal.js' - -export default { - title: 'Components / UserHome / WelcomeModal', - component: WelcomeModal -} - -export const Default = {}