Skip to content

Commit b69aabd

Browse files
authored
Merge pull request #250 from nishio/feature/reverse-event-groups
reverse EventGroups
2 parents 31314c3 + ad84c2e commit b69aabd

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

docs/localnode.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ Install node modules
1212
$ yarn
1313
```
1414

15-
If you want to run local node on docker. please run this command.
15+
Copy env file
1616

1717
```
18-
$ docker-compose up
18+
$ cp .env.example .env
1919
```
2020

21-
Otherwise, please run this command.
21+
If you want to run local node on docker. please run this command.
2222

2323
```
24-
$ yarn localchain
24+
$ docker-compose up
2525
```
2626

27-
Copy env file
27+
Otherwise, please run this command.
2828

2929
```
30-
$ cp .env.example .env
30+
$ yarn localchain
3131
```
3232

3333

@@ -37,6 +37,12 @@ _You need to do this step only once, if you are already done this, skip to step4
3737

3838
#### 2.1 Use this params to add localnetwork to metamask
3939

40+
Go to add network page
41+
42+
<img src="https://github.com/hackdays-io/mint-rally/assets/18475563/7fd6966e-6f65-41af-9bd1-960137478e85" width="300px">
43+
44+
Add Localnetwork
45+
4046
<img src="./documentImages/addlocalnet2metamask.png" width="300px" />
4147

4248
#### 2.2 Add local wallet to metamask

frontend/src/hooks/useEventManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ export const useEventGroups = () => {
155155
if (!eventManager) throw "error";
156156
setLoading(true);
157157
const data = await eventManager.getGroups();
158-
setGroups(data);
158+
// `reverse` is destructive, data is immutable, so need to clone before reverse
159+
const reversedData = reverse([...data]);
160+
setGroups(reversedData);
159161
setLoading(false);
160162
};
161163
getEventGroups();

0 commit comments

Comments
 (0)