mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-22 17:39:12 +01:00
Added react-router
This commit is contained in:
15
src-web/pages/Workspaces.tsx
Normal file
15
src-web/pages/Workspaces.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user