Skip to content

Commit 1591d87

Browse files
Updated blog navigation
1 parent 8927726 commit 1591d87

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

app/layout.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,26 @@ function NavItems() {
1818

1919
const tabs = [
2020
{ id: 'projects', label: 'Side Projects' },
21-
{ id: 'blog', label: 'Blog' },
22-
{ id: 'research', label: 'Research' },
23-
{ id: 'presentation', label: 'Presentation' },
24-
{ id: 'teaching', label: 'Teaching' },
21+
{ id: 'blog', label: 'Blog', externalUrl: 'https://hariesramdhani.github.io/writing' },
22+
// { id: 'research', label: 'Research' },
23+
// { id: 'presentation', label: 'Presentation' },
24+
// { id: 'teaching', label: 'Teaching' },
2525
];
2626

27+
const handleTabClick = (tab: { id: string; externalUrl?: string }) => {
28+
if (tab.externalUrl) {
29+
window.location.href = tab.externalUrl;
30+
} else {
31+
setActiveTab(tab.id);
32+
}
33+
};
34+
2735
return (
2836
<div className="flex flex-wrap gap-x-8">
2937
{tabs.map((tab) => (
3038
<button
3139
key={tab.id}
32-
onClick={() => setActiveTab(tab.id)}
40+
onClick={() => handleTabClick(tab)}
3341
className={`mb-5 px-2 rounded-lg ${activeTab === tab.id ? 'bg-gray-200' : 'text-gray-400'}`}
3442
style={{ fontSize: 24 }}
3543
>

0 commit comments

Comments
 (0)