mirror of https://github.com/fantasticit/think.git
fix typo
`TOGGLE_STAR_DOUCMENT ` => `TOGGLE_STAR_DOCUMENT `
This commit is contained in:
parent
4597430f34
commit
8b18a56e71
|
@ -3,7 +3,7 @@ import { useQuery, UseQueryOptions } from 'react-query';
|
|||
|
||||
import { IDocument, IWiki, StarApiDefinition } from '@think/domains';
|
||||
|
||||
import { event, TOGGLE_STAR_DOUCMENT, TOGGLE_STAR_WIKI, triggerToggleStarDocument, triggerToggleStarWiki } from 'event';
|
||||
import { event, TOGGLE_STAR_DOCUMENT, TOGGLE_STAR_WIKI, triggerToggleStarDocument, triggerToggleStarWiki } from 'event';
|
||||
import { HttpClient } from 'services/http-client';
|
||||
|
||||
export type IWikiWithIsMember = IWiki & { isMember?: boolean };
|
||||
|
@ -122,10 +122,10 @@ export const useStarDocumentsInOrganization = (organizationId) => {
|
|||
}
|
||||
);
|
||||
useEffect(() => {
|
||||
event.on(TOGGLE_STAR_DOUCMENT, refetch);
|
||||
event.on(TOGGLE_STAR_DOCUMENT, refetch);
|
||||
|
||||
return () => {
|
||||
event.off(TOGGLE_STAR_DOUCMENT, refetch);
|
||||
event.off(TOGGLE_STAR_DOCUMENT, refetch);
|
||||
};
|
||||
}, [refetch]);
|
||||
return { data, error, loading: isLoading, refresh: refetch };
|
||||
|
@ -218,10 +218,10 @@ export const useStarDocumentsInWiki = (organizationId, wikiId) => {
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
event.on(TOGGLE_STAR_DOUCMENT, refetch);
|
||||
event.on(TOGGLE_STAR_DOCUMENT, refetch);
|
||||
|
||||
return () => {
|
||||
event.off(TOGGLE_STAR_DOUCMENT, refetch);
|
||||
event.off(TOGGLE_STAR_DOCUMENT, refetch);
|
||||
};
|
||||
}, [refetch]);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ export const REFRESH_ORGANIZATIONS = 'REFRESH_ORGANIZATIONS'; // 刷新组织列
|
|||
export const REFRESH_TOCS = `REFRESH_TOCS`; // 刷新知识库目录
|
||||
export const CREATE_DOCUMENT = `CREATE_DOCUMENT`;
|
||||
export const TOGGLE_STAR_WIKI = `TOGGLE_STAR_WIKI`; // 收藏或取消收藏知识库
|
||||
export const TOGGLE_STAR_DOUCMENT = `TOGGLE_STAR_DOUCMENT`; // 收藏或取消收藏文档
|
||||
export const TOGGLE_STAR_DOCUMENT = `TOGGLE_STAR_DOCUMENT`; // 收藏或取消收藏文档
|
||||
|
||||
/**
|
||||
* 刷新知识库目录
|
||||
|
@ -60,7 +60,7 @@ export const triggerToggleStarWiki = () => {
|
|||
};
|
||||
|
||||
export const triggerToggleStarDocument = () => {
|
||||
event.emit(TOGGLE_STAR_DOUCMENT);
|
||||
event.emit(TOGGLE_STAR_DOCUMENT);
|
||||
};
|
||||
|
||||
export const triggerRefreshOrganizations = () => {
|
||||
|
|
Loading…
Reference in New Issue