refactor: docubook@latest template nextjs-docker

This commit is contained in:
gitfromwildan
2026-05-30 18:52:21 +07:00
parent bf2ef37f49
commit 80eb49d968
101 changed files with 1759 additions and 4165 deletions

View File

@@ -1,13 +1,12 @@
import Link from "next/link";
import { ModeToggle } from "@/components/ThemeToggle";
import docuData from "@/docu.json";
import * as LucideIcons from "lucide-react";
import { getSocialIconByName } from "@/lib/icon";
// Define types for docu.json
interface SocialItem {
name: string;
url: string;
iconName: string;
}
interface FooterConfig {
@@ -48,7 +47,7 @@ export function Footer({ id }: FooterProps) {
export function FooterButtons() {
const footer = docuConfig?.footer;
// Jangan render apapun jika tidak ada data sosial
// Don't render anything if there is no social data
if (!footer || !Array.isArray(footer.social) || footer.social.length === 0) {
return null;
}
@@ -56,9 +55,7 @@ export function FooterButtons() {
return (
<>
{footer.social.map((item) => {
const IconComponent =
(LucideIcons[item.iconName as keyof typeof LucideIcons] ??
LucideIcons["Globe"]) as React.FC<{ className?: string }>;
const IconComponent = getSocialIconByName(item.name);
return (
<Link