Skip to content

Commit 7328e34

Browse files
committed
merge
2 parents 1081270 + 79ae120 commit 7328e34

48 files changed

Lines changed: 148 additions & 82 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,29 @@
22

33
> [Arc.react](https://github.com/daostack/arc.react) componentizes [DAOstack's Arc.js library](https://github.com/daostack/arc.js), enabling easier React application integration.
44
5-
Turn any React app into a DAO enabled dApp in just 1, 2, 3...
5+
**Turn any React app into a DAO enabled dApp in just:**
66

7-
1. `npm i --save @daostack/arc.react`
8-
2. `<Arc config={new ArcConfig("rinkeby")}>`
9-
3. `<DAO address="0xMY_DAO">`
7+
1...
108

11-
Enabling you to build custom interfaces for displaying and interacting with your DAO's members...
9+
```bash
10+
npm i --save @daostack/arc.react`
11+
```
12+
13+
2...
14+
15+
```html
16+
<Arc config={new ArcConfig("rinkeby")}>
17+
```
18+
19+
3...
20+
21+
```html
22+
<DAO address="0xMY_DAO"></DAO>
23+
```
24+
25+
**Enabling you to build custom interfaces for displaying and interacting with your DAO's:**
26+
27+
members...
1228
1329
```html
1430
<Members>
@@ -42,7 +58,7 @@ proposals...
4258
</Proposals>
4359
```
4460
45-
and any other entity [within the DAOstack protocol](./src/components).
61+
**and any other entity [within the DAOstack protocol](./src/components)!**
4662
4763
## Read The Docs
4864

src/components/DAO.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from "../";
1010
import { CreateContextFeed } from "../runtime/ContextFeed";
1111

12-
interface RequiredProps extends ComponentProps {
12+
interface RequiredProps extends ComponentProps<Entity, Data> {
1313
// Address of the DAO Avatar
1414
address: string;
1515
}

src/components/DAOs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class InferredDAOs extends ComponentList<InferredProps, Component> {
4343
key={`${entity.id}_${index}`}
4444
address={entity.id}
4545
config={config}
46+
entity={entity}
4647
>
4748
{children}
4849
</Component>

src/components/Member.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from "react";
2+
import { Member as Entity, IMemberState as Data } from "@dorgtech/arc.js";
23
import {
34
Arc as Protocol,
45
ArcConfig as ProtocolConfig,
@@ -9,9 +10,8 @@ import {
910
ComponentProps,
1011
} from "../";
1112
import { CreateContextFeed } from "../runtime/ContextFeed";
12-
import { Member as Entity, IMemberState as Data } from "@dorgtech/arc.js";
1313

14-
interface RequiredProps extends ComponentProps {
14+
interface RequiredProps extends ComponentProps<Entity, Data> {
1515
// Address of the member
1616
address: string;
1717
dao?: string | DAOEntity;

src/components/Members.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from "react";
22
import { Observable } from "rxjs";
3+
import { IMemberQueryOptions as FilterOptions } from "@dorgtech/arc.js";
34
import {
45
Arc as Protocol,
56
ArcConfig as ProtocolConfig,
@@ -14,7 +15,6 @@ import {
1415
ComponentListProps,
1516
createFilterFromScope,
1617
} from "../";
17-
import { IMemberQueryOptions as FilterOptions } from "@dorgtech/arc.js";
1818
import { CreateContextFeed } from "../runtime/ContextFeed";
1919

2020
type Scopes = "DAO";
@@ -59,6 +59,7 @@ class InferredMembers extends ComponentList<InferredProps, Component> {
5959
address={entity.coreState!.address}
6060
dao={entity.coreState!.dao.entity}
6161
config={config}
62+
entity={entity}
6263
>
6364
{children}
6465
</Component>

src/components/Queue.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from "../";
1212
import { CreateContextFeed } from "../runtime/ContextFeed";
1313

14-
interface RequiredProps extends ComponentProps {
14+
interface RequiredProps extends ComponentProps<Entity, Data> {
1515
// Address of the Queue Avatar
1616
id: string;
1717
dao?: string | DAOEntity;

src/components/Queues.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from "react";
22
import { Observable } from "rxjs";
3+
import { IQueueQueryOptions as FilterOptions } from "@dorgtech/arc.js";
34
import {
45
Arc as Protocol,
56
ArcConfig as ProtocolConfig,
@@ -14,7 +15,6 @@ import {
1415
ComponentListProps,
1516
createFilterFromScope,
1617
} from "../";
17-
import { IQueueQueryOptions as FilterOptions } from "@dorgtech/arc.js";
1818
import { CreateContextFeed } from "../runtime/ContextFeed";
1919

2020
type Scopes = "DAO";
@@ -57,6 +57,7 @@ class InferredQueues extends ComponentList<InferredProps, Component> {
5757
dao={dao}
5858
id={entity.id}
5959
config={config}
60+
entity={entity}
6061
>
6162
{children}
6263
</Component>

src/components/Reputation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from "../";
1515
import { CreateContextFeed } from "../runtime/ContextFeed";
1616

17-
interface RequiredProps extends ComponentProps {
17+
interface RequiredProps extends ComponentProps<Entity, Data> {
1818
// Address of the Reputation Token
1919
address?: string;
2020
}

src/components/Reputations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from "react";
22
import { Observable } from "rxjs";
3+
import { IReputationQueryOptions as FilterOptions } from "@dorgtech/arc.js";
34
import {
45
Arc as Protocol,
56
ArcConfig as ProtocolConfig,
@@ -11,8 +12,6 @@ import {
1112
ComponentListLogs,
1213
ComponentListProps,
1314
} from "../";
14-
15-
import { IReputationQueryOptions as FilterOptions } from "@dorgtech/arc.js";
1615
import { CreateContextFeed } from "../runtime/ContextFeed";
1716

1817
type RequiredProps = ComponentListProps<Entity, FilterOptions>;
@@ -44,6 +43,7 @@ class InferredReputations extends ComponentList<InferredProps, Component> {
4443
key={`${entity.id}_${index}`}
4544
address={entity.address}
4645
config={config}
46+
entity={entity}
4747
>
4848
{children}
4949
</Component>

src/components/Reward.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
ComponentProps,
1010
} from "../";
1111

12-
interface RequiredProps extends ComponentProps {
12+
interface RequiredProps extends ComponentProps<Entity, Data> {
1313
// Reward ID
1414
id: string;
1515
}

0 commit comments

Comments
 (0)