Skip to content

Commit d289aeb

Browse files
committed
recent actions on index route
1 parent 76f4f4f commit d289aeb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

frontend/src/routes/index.tsx

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
import { Action } from "../components/Action";
12
import { useData } from "./root";
23

34
export const IndexPage = () => {
45
const {
5-
state: { books, users },
6+
log: { actions },
67
} = useData();
78

89
return (
910
<>
10-
<p>TODO show recent actions</p>
11+
<h2>Recent Actions</h2>
12+
{[...(actions || [])]
13+
.reverse()
14+
.slice(0, 5)
15+
.map((action) => (
16+
<Action action={action} />
17+
))}
1118
</>
1219
);
1320
};

0 commit comments

Comments
 (0)