Skip to content

Commit 87be73b

Browse files
authored
Merge pull request #384 from dojoengine/fix/historical-events-order
fix: historical events ordering
2 parents 772e2ee + 257d02a commit 87be73b

File tree

5 files changed

+865
-22
lines changed

5 files changed

+865
-22
lines changed

.changeset/neat-moose-press.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@dojoengine/sdk": patch
3+
"template-vite-ts": patch
4+
"@dojoengine/core": patch
5+
"@dojoengine/create-burner": patch
6+
"@dojoengine/create-dojo": patch
7+
"@dojoengine/predeployed-connector": patch
8+
"@dojoengine/react": patch
9+
"@dojoengine/state": patch
10+
"@dojoengine/torii-client": patch
11+
"@dojoengine/torii-wasm": patch
12+
"@dojoengine/utils": patch
13+
"@dojoengine/utils-wasm": patch
14+
---
15+
16+
Fix historical events ordering

examples/example-vite-react-sdk/src/historical-events.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useDojoSDK } from "@dojoengine/sdk/react";
99
export function HistoricalEvents() {
1010
const { account } = useAccount();
1111
const { sdk } = useDojoSDK();
12-
const [events, setEvents] = useState<ParsedEntity<SchemaType>[][]>([]);
12+
const [events, setEvents] = useState<ParsedEntity<SchemaType>[]>([]);
1313
const [subscription, setSubscription] = useState<Subscription | null>(null);
1414

1515
useEffect(() => {
@@ -82,8 +82,8 @@ export function HistoricalEvents() {
8282
return (
8383
<div className="mt-6">
8484
<h2 className="text-white">Player Events :</h2>
85-
{events.map((e: ParsedEntity<SchemaType>[], key) => {
86-
return <Event event={e[0]} key={key} />;
85+
{events.map((e: ParsedEntity<SchemaType>, key) => {
86+
return <Event event={e} key={key} />;
8787
})}
8888
</div>
8989
);

0 commit comments

Comments
 (0)