2025-03-12 08:17:34 +01:00
|
|
|
import About from "./About";
|
|
|
|
|
import Contact from "./Contact";
|
|
|
|
|
import Projects from "./Projects";
|
|
|
|
|
|
|
|
|
|
interface TabRouterProps {
|
|
|
|
|
width: number;
|
|
|
|
|
height: number;
|
|
|
|
|
selectedTab: "About" | "Projects" | "Contact";
|
2025-03-12 09:07:17 +01:00
|
|
|
scrollPosition: number;
|
2025-03-24 09:50:58 +01:00
|
|
|
userSpecs: {
|
|
|
|
|
userName?: string;
|
|
|
|
|
};
|
2025-03-12 08:17:34 +01:00
|
|
|
}
|
|
|
|
|
|
2025-03-24 09:50:58 +01:00
|
|
|
const TabRouter = async ({ width, height, selectedTab, scrollPosition, userSpecs }: TabRouterProps) => {
|
2025-03-12 08:17:34 +01:00
|
|
|
switch (selectedTab) {
|
|
|
|
|
case "About":
|
2025-03-24 09:50:58 +01:00
|
|
|
return About({ width, height, scrollPosition, userSpecs });
|
2025-03-12 08:17:34 +01:00
|
|
|
case "Projects":
|
2025-03-18 10:41:31 +01:00
|
|
|
return await Projects({ width, height, scrollPosition });
|
2025-03-12 08:17:34 +01:00
|
|
|
case "Contact":
|
|
|
|
|
return Contact({ width, height });
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export default TabRouter;
|