Skip to content

Commit

Permalink
docs(nx-dev): enable WebinarNotifier and update webinar details (#29591)
Browse files Browse the repository at this point in the history
Re-enabled the `WebinarNotifier` component in the app layout and updated the webinar date and localStorage key to reflect the new event on January 22, 2025.
  • Loading branch information
bcabanes authored Jan 11, 2025
1 parent 9dbebbe commit bbbfd9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion nx-dev/nx-dev/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function CustomApp({
</Link>
<Component {...pageProps} />
{/* <LiveStreamNotifier /> */}
{/*<WebinarNotifier />*/}
<WebinarNotifier />

{/* Global Site Tag (gtag.js) - Google Analytics */}
<Script
Expand Down
17 changes: 6 additions & 11 deletions nx-dev/ui-common/src/lib/webinar-notifier.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
'use client';

import { useState, useEffect, ReactElement } from 'react';
import { MouseEvent, ReactElement, useEffect, useState } from 'react';
import { motion } from 'framer-motion';
import { MonorepoWorldIcon } from '@nx/nx-dev/ui-icons';
import { ButtonLink } from './button';
import {
PlayIcon,
XMarkIcon,
ChatBubbleLeftRightIcon,
VideoCameraIcon,
MegaphoneIcon,
VideoCameraIcon,
XMarkIcon,
} from '@heroicons/react/24/outline';
import { sendCustomEvent } from '@nx/nx-dev/feature-analytics';

export function WebinarNotifier(): ReactElement | null {
const [isMounted, setIsMounted] = useState(false);
const [isVisible, setIsVisible] = useState<boolean>(true);
const localStorageKey = 'webinar-december-10-2024--notifier-closed';
const localStorageKey = 'webinar-january-22-2025--notifier-closed';

useEffect(() => {
setIsMounted(true);
Expand All @@ -26,7 +21,7 @@ export function WebinarNotifier(): ReactElement | null {
}
}, []);

const closeNotifier = (e: React.MouseEvent) => {
const closeNotifier = (e: MouseEvent) => {
e.stopPropagation();
setIsVisible(false);
localStorage.setItem(localStorageKey, 'true');
Expand Down Expand Up @@ -66,7 +61,7 @@ export function WebinarNotifier(): ReactElement | null {
aria-hidden="true"
className="size-8 flex-shrink-0"
/>
<span>Join our webinar + live Q&A on Dec 10th</span>
<span>Join our webinar + live Q&A on January 22nd</span>
</motion.h3>
<motion.div key="live-event" className="mt-4 space-y-4">
<p className="mb-2 text-sm">
Expand Down

0 comments on commit bbbfd9f

Please sign in to comment.