Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FW-3856-beta-sign #193

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/AppNavBar/AppNavBarPresentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function AppNavBarPresentation({ isHome = false, login, logout }) {
<br />
please click{' '}
<a
href="www.archive.firstvoices.com"
href="https://www.archive.firstvoices.com"
className="text-blue-600 visited:text-purple-600 underline underline-offset-2"
>
here
Expand Down
53 changes: 50 additions & 3 deletions src/components/NavBar/NavBarPresentation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useState } from 'react'
import { Link } from 'react-router-dom'
import PropTypes from 'prop-types'
import { Transition } from '@headlessui/react'
Expand All @@ -10,6 +10,7 @@ import SearchSiteForm from 'components/SearchSiteForm'
import UserMenu from 'components/UserMenu'
import JoinModalButton from 'components/JoinModalButton'
import getIcon from 'common/utils/getIcon'
import Modal from 'components/Modal'

function NavBarPresentation({
isHome,
Expand All @@ -20,6 +21,7 @@ function NavBarPresentation({
siteLoading,
}) {
const menuData = site?.menu || {}
const [betaModalOpen, setBetaModalOpen] = useState(false)

const generateMenu = (menu) => (
<NavBarPresentationMenu
Expand Down Expand Up @@ -49,9 +51,54 @@ function NavBarPresentation({
<span className="sr-only">FirstVoices Logo</span>
<Link to="/">{fvlogo}</Link>
</div>
<div className="w-16 text-white text-sm leading-tight text-center mr-2">
<button
className="w-16 text-white text-sm leading-tight text-center mr-2"
onClick={() => setBetaModalOpen(true)}
type="button"
>
Beta Version
</div>
</button>

<Modal.Presentation
isOpen={betaModalOpen}
closeHandler={() => setBetaModalOpen(false)}
>
<div
data-testid="BetaModalContent"
className="bg-white rounded-lg shadow-lg px-6 py-32"
>
<h2 className="text-3xl font-bold tracking-tight text-fv-charcoal sm:text-4xl">
Welcome to the new FirstVoices!
</h2>
<p className="mx-auto mt-3 md:mt-6 max-w-xl text-lg leading-8 text-fv-charcoal-light">
The beta version of FirstVoices v3 is now live.
<br /> If you are looking for the old version of
FirstVoices, <br />
please click{' '}
<a
href="https://www.archive.firstvoices.com"
target="_blank"
Cara-Barter marked this conversation as resolved.
Show resolved Hide resolved
rel="noopener noreferrer"
className="text-blue-600 visited:text-purple-600 underline underline-offset-2"
>
here
</a>
{/*
*/}
. Having issues with the new version? <br />
Please contact us{' '}
<a
href="mailto:hello@firstvoices.com"
className="text-blue-600 visited:text-purple-600 underline underline-offset-2"
>
here
</a>
{/*
*/}
.
</p>
</div>
</Modal.Presentation>
{!isHome && (
<Link
className="h-9 text-white flex items-center group bg-fv-charcoal rounded-lg text-lg font-medium hover:text-gray-100"
Expand Down
Loading