Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed May 3, 2023
1 parent 7c852cb commit 06fb75d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
import { render } from '@testing-library/react';
import React from 'react';
import { DashboardViewPromptState } from '../hooks/use_dashboard_view_prompt_state';
import { StatusPropmpt } from './status_prompt';
import { StatusPrompt } from './status_prompt';

describe('StatusPropmpt', () => {
describe('StatusPrompt', () => {
it('hides by default', () => {
const { queryByTestId } = render(<StatusPropmpt currentState={null} />);
const { queryByTestId } = render(<StatusPrompt currentState={null} />);
expect(queryByTestId(`dashboardViewEmptyDefault`)).not.toBeInTheDocument();
});

it('shows when No Read Permission', () => {
const { queryByTestId } = render(
<StatusPropmpt currentState={DashboardViewPromptState.NoReadPermission} />
<StatusPrompt currentState={DashboardViewPromptState.NoReadPermission} />
);

expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { EuiPageTemplate } from '@elastic/eui';
import type { DashboardViewPromptState } from '../hooks/use_dashboard_view_prompt_state';
import { useDashboardViewPromptState } from '../hooks/use_dashboard_view_prompt_state';

const StatusPropmptComponent = ({
const StatusPromptComponent = ({
currentState,
}: {
currentState: DashboardViewPromptState | null;
Expand All @@ -21,5 +21,5 @@ const StatusPropmptComponent = ({
</EuiPageTemplate>
) : null;
};
StatusPropmptComponent.displayName = 'StatusPropmptComponent';
export const StatusPropmpt = React.memo(StatusPropmptComponent);
StatusPromptComponent.displayName = 'StatusPromptComponent';
export const StatusPrompt = React.memo(StatusPromptComponent);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { SpyRoute } from '../../../common/utils/route/spy_routes';
import { useCapabilities } from '../../../common/lib/kibana';
import { DashboardViewPromptState } from '../../hooks/use_dashboard_view_prompt_state';
import { DashboardRenderer } from '../../../common/components/dashboards/dashboard_renderer';
import { StatusPropmpt } from '../../components/status_prompt';
import { StatusPrompt } from '../../components/status_prompt';
import { SiemSearchBar } from '../../../common/components/search_bar';
import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper';
import { FiltersGlobal } from '../../../common/components/filters_global';
Expand Down Expand Up @@ -111,7 +111,7 @@ const DashboardViewComponent: React.FC = () => {
)}
{errorState && (
<EuiFlexItem data-test-subj="dashboard-view-error-prompt-wrapper" grow>
<StatusPropmpt currentState={errorState} />
<StatusPrompt currentState={errorState} />
</EuiFlexItem>
)}
<SpyRoute
Expand Down

0 comments on commit 06fb75d

Please sign in to comment.