Skip to content

Commit

Permalink
FW-3856-beta-sign (#193)
Browse files Browse the repository at this point in the history
* added missing https:// as well as added button to other navbar

* open in a new tab
  • Loading branch information
Cara-Barter authored Nov 16, 2023
1 parent dd28ce0 commit ce72ee4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
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"
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

0 comments on commit ce72ee4

Please sign in to comment.