feat: move Demo button next to CTA in header right section
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { useTranslation } from "@turbostarter/i18n";
|
||||||
|
import { cn } from "@turbostarter/ui";
|
||||||
|
import { buttonVariants } from "@turbostarter/ui-web/button";
|
||||||
|
|
||||||
import { pathsConfig } from "~/config/paths";
|
import { pathsConfig } from "~/config/paths";
|
||||||
import { WhyRatingLogo } from "~/modules/common/whyrating-logo";
|
import { WhyRatingLogo } from "~/modules/common/whyrating-logo";
|
||||||
import { TurboLink } from "~/modules/common/turbo-link";
|
import { TurboLink } from "~/modules/common/turbo-link";
|
||||||
@@ -13,11 +17,6 @@ const links = [
|
|||||||
label: "marketing:howItWorks.label",
|
label: "marketing:howItWorks.label",
|
||||||
href: "/#how-it-works",
|
href: "/#how-it-works",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "marketing:demoLabel",
|
|
||||||
href: pathsConfig.demo.report,
|
|
||||||
variant: "button" as const,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "billing:pricing.label",
|
label: "billing:pricing.label",
|
||||||
href: pathsConfig.marketing.pricing,
|
href: pathsConfig.marketing.pricing,
|
||||||
@@ -33,6 +32,8 @@ const links = [
|
|||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export const Header = () => {
|
export const Header = () => {
|
||||||
|
const { t } = useTranslation("marketing");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className="bg-background/80 sticky inset-0 top-[var(--banner-height)] z-40 w-full py-3 backdrop-blur-sm">
|
<header className="bg-background/80 sticky inset-0 top-[var(--banner-height)] z-40 w-full py-3 backdrop-blur-sm">
|
||||||
<div className="flex items-center justify-between px-6 pr-4 sm:container">
|
<div className="flex items-center justify-between px-6 pr-4 sm:container">
|
||||||
@@ -46,7 +47,16 @@ export const Header = () => {
|
|||||||
|
|
||||||
<Navigation links={links} />
|
<Navigation links={links} />
|
||||||
|
|
||||||
<div className="flex items-center justify-center lg:gap-2">
|
<div className="flex items-center justify-center gap-2">
|
||||||
|
<TurboLink
|
||||||
|
href={pathsConfig.demo.report}
|
||||||
|
className={cn(
|
||||||
|
buttonVariants({ variant: "outline", size: "sm" }),
|
||||||
|
"hidden lg:inline-flex",
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t("demoLabel")}
|
||||||
|
</TurboLink>
|
||||||
<CtaButton className="hidden lg:inline-flex" />
|
<CtaButton className="hidden lg:inline-flex" />
|
||||||
<MobileNavigation links={links} />
|
<MobileNavigation links={links} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,8 +97,6 @@ export const MobileNavigation = ({ links }: NavigationProps) => {
|
|||||||
className={cn(
|
className={cn(
|
||||||
navigationMenuTriggerStyle(),
|
navigationMenuTriggerStyle(),
|
||||||
"w-full justify-start text-base font-medium",
|
"w-full justify-start text-base font-medium",
|
||||||
"href" in link && link.variant === "button" &&
|
|
||||||
"border bg-primary/5 font-semibold rounded-full",
|
|
||||||
)}
|
)}
|
||||||
onClick={() => setOpen(false)}
|
onClick={() => setOpen(false)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -27,11 +27,7 @@ export const Navigation = ({ links }: NavigationProps) => {
|
|||||||
<NavigationMenuLink asChild>
|
<NavigationMenuLink asChild>
|
||||||
<TurboLink
|
<TurboLink
|
||||||
href={link.href}
|
href={link.href}
|
||||||
className={cn(
|
className={navigationMenuTriggerStyle()}
|
||||||
navigationMenuTriggerStyle(),
|
|
||||||
"href" in link && link.variant === "button" &&
|
|
||||||
"border bg-primary/5 font-semibold hover:bg-primary/10 rounded-full px-4",
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
{t(link.label)}
|
{t(link.label)}
|
||||||
</TurboLink>
|
</TurboLink>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ export type NavigationLink =
|
|||||||
| {
|
| {
|
||||||
readonly label: TranslationKey;
|
readonly label: TranslationKey;
|
||||||
readonly href: string;
|
readonly href: string;
|
||||||
readonly variant?: "default" | "button";
|
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
readonly label: TranslationKey;
|
readonly label: TranslationKey;
|
||||||
|
|||||||
Reference in New Issue
Block a user