mirror of https://github.com/fantasticit/think.git
add isMember in wikis
This commit is contained in:
parent
dac7667714
commit
83db0fe9ba
|
@ -21,7 +21,7 @@ const grid = {
|
|||
|
||||
const { Title } = Typography;
|
||||
|
||||
const Workspaces = ({ hook }) => {
|
||||
const Wikis = ({ hook }) => {
|
||||
const { data, loading, error } = hook();
|
||||
|
||||
return (
|
||||
|
@ -65,13 +65,13 @@ const Page: NextPage = () => {
|
|||
</Title>
|
||||
<Tabs type="button" style={{ marginTop: 24 }}>
|
||||
<TabPane tab="全部" itemKey="all">
|
||||
<Workspaces hook={useAllWikis} />
|
||||
<Wikis hook={useAllWikis} />
|
||||
</TabPane>
|
||||
<TabPane tab="我创建的" itemKey="own">
|
||||
<Workspaces hook={useOwnWikis} />
|
||||
<Wikis hook={useOwnWikis} />
|
||||
</TabPane>
|
||||
<TabPane tab="我参与的" itemKey="join">
|
||||
<Workspaces hook={useJoinWikis} />
|
||||
<Wikis hook={useJoinWikis} />
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
|
|
@ -342,7 +342,7 @@ export class WikiService {
|
|||
const ret = await Promise.all(
|
||||
data.map(async (wiki) => {
|
||||
const createUser = await this.userService.findById(wiki.createUserId);
|
||||
return { ...wiki, createUser };
|
||||
return { ...wiki, createUser, isMember: true };
|
||||
})
|
||||
);
|
||||
|
||||
|
@ -368,7 +368,7 @@ export class WikiService {
|
|||
const ret = await Promise.all(
|
||||
data.map(async (wiki) => {
|
||||
const createUser = await this.userService.findById(wiki.createUserId);
|
||||
return { ...wiki, createUser };
|
||||
return { ...wiki, createUser, isMember: true };
|
||||
})
|
||||
);
|
||||
|
||||
|
@ -397,7 +397,7 @@ export class WikiService {
|
|||
const ret = await Promise.all(
|
||||
data.map(async (wiki) => {
|
||||
const createUser = await this.userService.findById(wiki.createUserId);
|
||||
return { ...wiki, createUser };
|
||||
return { ...wiki, createUser, isMember: true };
|
||||
})
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue