add isMember in wikis

This commit is contained in:
fantasticit 2022-05-18 21:49:50 +08:00
parent dac7667714
commit 83db0fe9ba
2 changed files with 7 additions and 7 deletions

View File

@ -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>

View File

@ -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 };
})
);