Merged PR 194: Added option to disable any API call
Added option to disable any API call Fix http.js and node-http.js Fix MainContainer not using IAvailableContainer from MainContainer Fix generate_dts.py script More docs Fix MainContainer default style. Extend config will now be taken into account. But Main container can still have its own type.
This commit is contained in:
parent
8ba19cc96b
commit
3ecff4cf01
10 changed files with 648 additions and 570 deletions
|
@ -6,6 +6,7 @@ import { IGetFeedbackRequest } from '../../Interfaces/IGetFeedbackRequest';
|
|||
import { IGetFeedbackResponse } from '../../Interfaces/IGetFeedbackResponse';
|
||||
import { IHistoryState } from '../../Interfaces/IHistoryState';
|
||||
import { IMessage } from '../../Interfaces/IMessage';
|
||||
import { DISABLE_API } from '../../utils/default';
|
||||
import { GetCircularReplacerKeepDataStructure } from '../../utils/saveload';
|
||||
|
||||
interface IMessagesSidebarProps {
|
||||
|
@ -68,12 +69,12 @@ export function MessagesSidebar(props: IMessagesSidebarProps): JSX.Element {
|
|||
const [messages, setMessages] = React.useState<IMessage[]>([]);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||
if (window.Worker) {
|
||||
if (window.Worker && !DISABLE_API) {
|
||||
UseWorker(
|
||||
props.historyState,
|
||||
setMessages
|
||||
);
|
||||
} else {
|
||||
} else if (!DISABLE_API) {
|
||||
UseAsync(
|
||||
props.historyState,
|
||||
setMessages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue