mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
fix alert banner show / hide logic, hide apex banner
This commit is contained in:
@@ -11,7 +11,7 @@ import { Search } from "@theme/components/Search/Search";
|
||||
// @ts-ignore
|
||||
|
||||
const alertBanner = {
|
||||
show: true,
|
||||
show: false,
|
||||
message: "XRP Ledger Apex is back in Amsterdam",
|
||||
button: "Register Now",
|
||||
link: "https://www.xrpledgerapex.com/?utm_source=email&utm_medium=email_marketing&utm_campaign=EVENTS_XRPL_Apex_2024_Q2&utm_term=events_page_cta_button",
|
||||
@@ -92,7 +92,7 @@ export function Navbar(props) {
|
||||
button={alertBanner.button}
|
||||
link={alertBanner.link}
|
||||
/>
|
||||
<NavWrapper belowAlertBanner={true}>
|
||||
<NavWrapper belowAlertBanner={alertBanner.show}>
|
||||
<LogoBlock to={href} img={logo} alt={altText} />
|
||||
<NavControls>
|
||||
<MobileMenuIcon />
|
||||
@@ -121,7 +121,8 @@ const StyledColorModeSwitcher = styled(ColorModeSwitcher)`
|
||||
`;
|
||||
|
||||
export function AlertBanner(props) {
|
||||
const { message, button, link } = props;
|
||||
const { message, button, link, show } = props;
|
||||
if (show) {
|
||||
return (
|
||||
<div className="top-banner fixed-top">
|
||||
<div className="inner-apex">
|
||||
@@ -137,6 +138,8 @@ export function AlertBanner(props) {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function TopNavCollapsible(props) {
|
||||
return (
|
||||
@@ -174,7 +177,9 @@ export function NavDropdown(props) {
|
||||
|
||||
return (
|
||||
<div key={index} className={clnm}>
|
||||
<h5 className="dropdown-item">{translate(item.labelTranslationKey, item.label)}</h5>
|
||||
<h5 className="dropdown-item">
|
||||
{translate(item.labelTranslationKey, item.label)}
|
||||
</h5>
|
||||
{groupLinks}
|
||||
</div>
|
||||
);
|
||||
@@ -187,7 +192,7 @@ export function NavDropdown(props) {
|
||||
hero_href = pathPrefix + hero_href;
|
||||
}
|
||||
const splitlabel = item.label.split(" || ");
|
||||
let splittranslationkey = ["",""]
|
||||
let splittranslationkey = ["", ""];
|
||||
if (item.labelTranslationKey) {
|
||||
splittranslationkey = item.labelTranslationKey.split(" || ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user