Tab switcher

This commit is contained in:
Max Lynch
2020-12-20 23:45:08 -06:00
parent 8b2df11c87
commit e8324428bf
8 changed files with 46 additions and 19 deletions
+8 -2
View File
@@ -15,8 +15,14 @@ const pages = [
]
const CurrentPage = ({ page }) => {
const Page = page.component;
return <Page />;
return (
<div className="flex-1 overflow-hidden relative">
{pages.map(p => {
const Page = p.component;
return <Page selected={page.id === p.id} />
})}
</div>
)
}
export default function Index() {