Added react-router

This commit is contained in:
Gregory Schier
2023-02-25 18:04:14 -08:00
parent 93105a3e89
commit 83bb18df03
12 changed files with 180 additions and 67 deletions

View File

@@ -0,0 +1,15 @@
import { Link, useParams } from 'react-router-dom';
import { useWorkspaces } from '../hooks/useWorkspaces';
export function Workspaces() {
const workspaces = useWorkspaces();
return (
<ul className="p-12">
{workspaces.data?.map((w) => (
<Link key={w.id} to={`/workspaces/${w.id}`}>
{w.name}
</Link>
))}
</ul>
);
}