Portfolio/front/Tabs/TabRouter.ts

23 lines
588 B
TypeScript
Raw Normal View History

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";
scrollPosition: number;
2025-03-12 08:17:34 +01:00
}
2025-03-18 10:41:31 +01:00
const TabRouter = async ({ width, height, selectedTab, scrollPosition }: TabRouterProps) => {
2025-03-12 08:17:34 +01:00
switch (selectedTab) {
case "About":
return About({ width, height, scrollPosition });
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;