mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 19:13:51 +00:00
Header placeholders for working ssr
This commit is contained in:
@@ -15,8 +15,25 @@ let tabs = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
function Header() {
|
function Header() {
|
||||||
|
const [mounted, setMounted] = useState(false);
|
||||||
let [activeTab, setActiveTab] = useState(tabs[0].id);
|
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 (
|
return (
|
||||||
<div className="flex space-x-1">
|
<div className="flex space-x-1">
|
||||||
{tabs.map((tab) => (
|
{tabs.map((tab) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user