feat: integrate donate page into navbar and home
Add donate link to navbar (replacing old /tip) and enable the donate card on the home page (disabled, for prod testing).
This commit is contained in:
+2
-2
@@ -19,7 +19,7 @@ export function Navbar() {
|
||||
const mobile = useIsMobile();
|
||||
|
||||
if (
|
||||
!/^\/(?:tl(?:\/[a-zA-Z0-9]+)?|rubgram|artifact|guide|tip)$/gm.test(pathname)
|
||||
!/^\/(?:tl(?:\/[a-zA-Z0-9]+)?|rubgram|artifact|guide|donate)$/gm.test(pathname)
|
||||
)
|
||||
return "";
|
||||
return (
|
||||
@@ -42,7 +42,7 @@ export function Navbar() {
|
||||
/>
|
||||
<Item icon={<Table size={16} />} name="จัดเทียร์ลิสต์" href="/tl" />
|
||||
<Item icon={<StickyNote size={16} />} name="ไกด์ตัวละคร" href="/guide" />
|
||||
<Item icon={<Bitcoin size={16} />} name="โดเนทขึ้นจอ" href="/tip" last />
|
||||
<Item icon={<Bitcoin size={16} />} name="โดเนทขึ้นจอ" href="/donate" last />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
+13
-5
@@ -6,6 +6,7 @@ import ArtifactLogo from "#/logos/artifact.webp";
|
||||
import GuideLogo from "#/logos/guide.webp";
|
||||
import RubgramLogo from "#/logos/rubgram.webp";
|
||||
import TierlistLogo from "#/logos/tierlist.webp";
|
||||
import DonateLogo from "#/logos/donate.svg";
|
||||
import Image from "@/components/image";
|
||||
import { SimpleTooltip } from "@/components/tooltip";
|
||||
import { cn } from "@/lib/utils";
|
||||
@@ -59,12 +60,13 @@ export default function Home() {
|
||||
href="/guide"
|
||||
logo={GuideLogo}
|
||||
/>
|
||||
{/* <HomeLink
|
||||
<HomeLink
|
||||
name="Donate"
|
||||
desc="โดเนทขึ้นไลฟ์สตรีม"
|
||||
href="/tip"
|
||||
logo={GuideLogo}
|
||||
/> */}
|
||||
href="/donate"
|
||||
disabled
|
||||
logo={DonateLogo}
|
||||
/>
|
||||
</div>
|
||||
<footer className="text-muted-foreground h-full flex flex-col justify-end pb-3 md:justify-center">
|
||||
<div className="flex justify-between flex-col text-center gap-2 sm:flex-row sm:text-left">
|
||||
@@ -139,18 +141,24 @@ function HomeLink({
|
||||
logo,
|
||||
desc,
|
||||
className,
|
||||
disabled,
|
||||
}: {
|
||||
href: string;
|
||||
name: string;
|
||||
desc: ReactNode;
|
||||
logo: string | StaticImport;
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<SimpleTooltip text={desc}>
|
||||
<Link
|
||||
href={href}
|
||||
className={cn("flex flex-col p-10 text-center", className)}
|
||||
className={cn(
|
||||
"flex flex-col p-10 text-center",
|
||||
disabled && "pointer-events-none brightness-50",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<Image
|
||||
src={logo}
|
||||
|
||||
Reference in New Issue
Block a user