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

add banners for launch week 5 #8368

Merged
merged 1 commit into from
Apr 29, 2024
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
8 changes: 4 additions & 4 deletions frontend/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1007,8 +1007,8 @@ const BillingBanner: React.FC = () => {

if (!bannerMessage && !hasTrial) {
const isLaunchWeek = moment().isBetween(
'2024-01-29T16:00:00Z', // 9AM PST
'2024-02-03T16:00:00Z',
'2024-04-29T16:00:00Z', // 9AM PST
'2024-05-04T16:00:00Z',
)
if (isLaunchWeek) {
return <LaunchWeekBanner />
Expand Down Expand Up @@ -1116,10 +1116,10 @@ const LaunchWeekBanner = () => {

const bannerMessage = (
<span>
Launch Week 4 is here.{' '}
Launch Week 5 is here.{' '}
<a
target="_blank"
href="https://www.highlight.io/launch/week-4"
href="https://www.highlight.io/blog/tag/launch-week-5"
className={styles.trialLink}
rel="noreferrer"
>
Expand Down
19 changes: 7 additions & 12 deletions highlight.io/components/common/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,12 @@ import Banner from '../Banner/Banner'
import FeatureDropdown from './FeatureDropdown'

const LaunchWeekBanner = () => {
const day = moment().diff(moment('2023-07-17T16:00:00Z'), 'days') + 1
if (day < 1 || day > 5) {
return null
}

const bannerMessage = (
<div className={styles.launchWeekText}>
Launch Week 2 is here.{' '}
Launch Week 5 is here.{' '}
<a
target="_blank"
href="https://www.highlight.io/launch-week-2"
href="https://www.highlight.io/blog/tag/launch-week-5"
rel="noreferrer"
>
Follow along
Expand Down Expand Up @@ -101,9 +96,9 @@ const Navbar = ({
setPrevY(currentScrollPos)
}

const isLivestreamWeek = moment().isBetween(
'2024-04-16T00:00:00Z',
'2024-05-16T00:00:00Z',
const isLaunchWeek = moment().isBetween(
'2024-04-29T16:00:00Z',
'2024-05-04T16:00:00Z',
)

useEffect(() => {
Expand All @@ -115,8 +110,8 @@ const Navbar = ({
<>
{!hideGitHubPopup && <GithubPopup />}
{!hideBanner ? (
isLivestreamWeek ? (
<LivestreamBanner />
isLaunchWeek ? (
<LaunchWeekBanner />
) : (
<Link
href="/startups"
Expand Down
Loading