feat: Display landing page only in demo mode (#226)

This commit is contained in:
Jozef Dochan
2025-05-22 14:45:06 +02:00
committed by GitHub
parent 499b255fe6
commit d2934e8da4
4 changed files with 132 additions and 113 deletions

View File

@@ -24,6 +24,7 @@ import DropdownAccount from './DropdownAccount';
import DropdownLanguage from './DropdownLanguage';
import UserAvatar from '@/components/UserAvatar';
import { LocaleCodeType } from '@/types/locale';
import Config from '@/config/config';
type NabbarMenuMessages = {
projects: string;
@@ -54,20 +55,25 @@ export default function HeaderNavbarMenu({ messages, locale }: Props) {
label: messages.projects,
isExternal: false,
},
{
uid: 'docs',
href: 'https://kimatata.github.io/unittcms/docs/getstarted/selfhost',
label: messages.docs,
isExternal: true,
},
{
uid: 'roadmap',
href: 'https://kimatata.github.io/unittcms/docs/roadmap/',
label: messages.roadmap,
isExternal: true,
},
];
if (Config.isDemoSite) {
commonLinks.push(
{
uid: 'docs',
href: 'https://kimatata.github.io/unittcms/docs/getstarted/selfhost',
label: messages.docs,
isExternal: true,
},
{
uid: 'roadmap',
href: 'https://kimatata.github.io/unittcms/docs/roadmap/',
label: messages.roadmap,
isExternal: true,
}
);
}
const router = useRouter();
const pathname = usePathname();
async function changeLocale(nextLocale: string) {