Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
artemmufazalov committed Aug 2, 2024
1 parent a8a812d commit 551812d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 104 deletions.
16 changes: 6 additions & 10 deletions src/containers/App/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {RedirectProps} from 'react-router-dom';
import {Redirect, Route, Switch} from 'react-router-dom';

import {PageError} from '../../components/Errors/PageError/PageError';
import {Loader} from '../../components/Loader';
import {LoaderWrapper} from '../../components/LoaderWrapper/LoaderWrapper';
import {useSlots} from '../../components/slots';
import type {SlotMap} from '../../components/slots/SlotMap';
import type {SlotComponent} from '../../components/slots/types';
Expand Down Expand Up @@ -170,15 +170,11 @@ export function Content(props: ContentProps) {
function GetUser({children}: {children: React.ReactNode}) {
const {isLoading, error} = authenticationApi.useWhoamiQuery(undefined);

if (isLoading) {
return <Loader size="l" />;
}

if (error) {
return <PageError error={error} />;
}

return children;
return (
<LoaderWrapper loading={isLoading} size="l">
<PageError error={error}>{children}</PageError>
</LoaderWrapper>
);
}

function GetNodesList() {
Expand Down
3 changes: 0 additions & 3 deletions src/store/reducers/executeQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ import type {
import {QUERIES_HISTORY_KEY} from '../../utils/constants';
import {QUERY_SYNTAX, isQueryErrorResponse, parseQueryAPIExecuteResponse} from '../../utils/query';
import {isNumeric} from '../../utils/utils';
import {createRequestActionTypes} from '../utils';

import {api} from './api';

const MAXIMUM_QUERIES_IN_HISTORY = 20;

export const SEND_QUERY = createRequestActionTypes('query', 'SEND_QUERY');

const CHANGE_USER_INPUT = 'query/CHANGE_USER_INPUT';
const SAVE_QUERY_TO_HISTORY = 'query/SAVE_QUERY_TO_HISTORY';
const GO_TO_PREVIOUS_QUERY = 'query/GO_TO_PREVIOUS_QUERY';
Expand Down
91 changes: 0 additions & 91 deletions src/store/utils.ts

This file was deleted.

0 comments on commit 551812d

Please sign in to comment.