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

fix: update banner background color to robin 500 #983

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
68 changes: 34 additions & 34 deletions components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
"use client";
'use client'

import { useEffect, useState } from 'react';
import { X } from 'lucide-react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { useEffect, useState } from 'react'
import { X } from 'lucide-react'
import Link from 'next/link'
import { usePathname } from 'next/navigation'

const Banner = () => {
const [visible, setVisible] = useState(true);
const pathname = usePathname();
const [isHomePage, setIsHomePage] = useState(false);

useEffect(() => {
setIsHomePage(pathname === '/');
}, [pathname]);

if (!visible || !isHomePage) return null;

//Uncomment the below code to launch a banner on homepage and comment our return null

return (
<div className="w-full bg-indigo-500 flex items-center justify-center py-2">
<div className="w-full flex justify-between items-center px-4 md:justify-center">
<Link href="https://lu.ma/1z2jr0yy" className="text-base font-medium text-white leading-5">
Join us for SigNoz Community call on 20th November 🚀
</Link>
<button className="text-white md:absolute md:right-4" onClick={() => setVisible(false)}>
<X size={16} />
</button>
</div>
</div>
);

// return null;
};

export default Banner;
const [visible, setVisible] = useState(true)
const pathname = usePathname()
const [isHomePage, setIsHomePage] = useState(false)

useEffect(() => {
setIsHomePage(pathname === '/')
}, [pathname])

if (!visible || !isHomePage) return null

//Uncomment the below code to launch a banner on homepage and comment our return null

return (
<div className="flex w-full items-center justify-center bg-signoz_robin-500 py-2">
<div className="flex w-full items-center justify-between px-4 md:justify-center">
<Link href="https://lu.ma/1z2jr0yy" className="text-base font-medium leading-5 text-white">
Join us for SigNoz Community call on 20th November 🚀
</Link>
<button className="text-white md:absolute md:right-4" onClick={() => setVisible(false)}>
<X size={16} />
</button>
</div>
</div>
)

// return null;
}

export default Banner