feat/ui-1.0.2:when about page content is empty,need to hide about navigation

This commit is contained in:
riverLethe committed 2025-09-28 14:19:29 +08:00
1 parent f98ff6bf44
commit 92aa83cb71
4 files changed
+28 -5

No files matched your search

@@ -17,6 +17,14 @@ export const AboutThemeSelector: React.FC = () => {
const currentTheme = platformConfig.theme || Theme.DEFAULT;
const navigationItems = [
...NavigationItems,
...(platformConfig.about_page
? [
{
label: "About",
href: "/about",
},
]
: []),
...topNavigation.map((item) => ({
label: item.title,
href: item.link,
@@ -36,6 +36,14 @@ export const ProductDetailThemeSelector: React.FC<
const { t } = useTranslation();
const navigationItems = [
...NavigationItems,
...(platformConfig.about_page
? [
{
label: "About",
href: "/about",
},
]
: []),
...topNavigation.map((item) => ({
label: item.title,
href: item.link,
@@ -45,7 +53,10 @@ export const ProductDetailThemeSelector: React.FC<
useEffect(() => {
if (url || !product.slug_name) return;
setUrl(
`${mcpServerPrefix || `${window.location.protocol}//${window.location.hostname}:8002`}/mcp/${product.slug_name}`
`${
mcpServerPrefix ||
`${window.location.protocol}//${window.location.hostname}:8002`
}/mcp/${product.slug_name}`
);
}, [product.slug_name]);
function sanitizeMCPServerName(rawName: string | undefined): string {
@@ -5,8 +5,4 @@ export const NavigationItems: NavigationItem[] = [
label: "Home",
href: "/",
},
{
label: "About",
href: "/about",
},
];
@@ -38,6 +38,14 @@ export const ThemeSelector: React.FC<ThemeSelectorProps> = ({
const currentTheme = platformConfig.theme || Theme.DEFAULT;
const navigationItems = [
...NavigationItems,
...(platformConfig.about_page
? [
{
label: "About",
href: "/about",
},
]
: []),
...topNavigation.map((item) => ({
label: item.title,
href: item.link,