mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 11:03:50 +00:00
Header placeholders for working ssr
This commit is contained in:
@@ -15,8 +15,25 @@ let tabs = [
|
||||
];
|
||||
|
||||
function Header() {
|
||||
const [mounted, setMounted] = useState(false);
|
||||
let [activeTab, setActiveTab] = useState(tabs[0].id);
|
||||
|
||||
useEffect(() => {
|
||||
setMounted(true);
|
||||
}, []);
|
||||
|
||||
if (!mounted) {
|
||||
return (
|
||||
<div className="flex space-x-1">
|
||||
{tabs.map((tab) => (
|
||||
<div key={tab.id} className="invisible">
|
||||
{/* Placeholder for each tab */}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex space-x-1">
|
||||
{tabs.map((tab) => (
|
||||
|
||||
Reference in New Issue
Block a user