's'
This commit is contained in:
@@ -566,7 +566,7 @@ function RelatedContent({ items, compact = false }: { items: Array<Record<string
|
||||
if (type === "ebook") return `/ebooks/${slug}`;
|
||||
if (type === "video") return `/videos/${slug}`;
|
||||
if (type === "app") return "/app";
|
||||
return String(item.targetUrl || "https://digital.hackrobot.cn/zh");
|
||||
return String(item.targetUrl || "/digital");
|
||||
};
|
||||
return (
|
||||
<Panel title="关联内容">
|
||||
|
||||
15
app/components/RouteAwareNavbar.tsx
Normal file
15
app/components/RouteAwareNavbar.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { usePathname } from "next/navigation";
|
||||
import Navbar from "./Navbar";
|
||||
|
||||
export default function RouteAwareNavbar() {
|
||||
const pathname = usePathname();
|
||||
const isDigitalRoute = /^\/(zh|en)\/digital(?:\/|$)/.test(pathname);
|
||||
|
||||
if (isDigitalRoute) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <Navbar />;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ export default memo(function SiteMenu({
|
||||
{
|
||||
titleKey: "other",
|
||||
items: [
|
||||
{ labelKey: "digitalNomadGuide", href: process.env.NEXT_PUBLIC_DIGITAL_URL || "https://digital.hackrobot.cn/", icon: "📖" },
|
||||
{ labelKey: "digitalNomadGuide", href: "/digital", icon: "📖" },
|
||||
{ labelKey: "remoteJobs", href: "#", icon: "💼" },
|
||||
{ labelKey: "coworking", href: "#", icon: "🏢" },
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user