Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Schüler committed Jun 14, 2024
1 parent f41dcd1 commit ec69e4b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion new/src/components/Scenarios/Scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function Scenario({
setExpanded(isExpansion);
isExpansion ? onExpansionCallback() : onCollapsionCallback();
},
[expanded, onExpansionCallback, onCollapsionCallback]
[onExpansionCallback, onCollapsionCallback]
);

return (
Expand Down
2 changes: 1 addition & 1 deletion new/src/components/Scenarios/ScenarioOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function ScenarioOverview(props: {
description: string;
}) {
const [allExpanded, setAllExpanded] = useState<ExpansionState>(ExpansionState.COLLAPSED);
const {filter} = useFilters();
const { filter } = useFilters();
const scenarios = repository.getAllScenarios();

return (
Expand Down
4 changes: 2 additions & 2 deletions new/src/components/Scenarios/__test__/ScenarioStep.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { render, screen } from "@testing-library/react";
import { render, screen, within } from "@testing-library/react";
import { createStepModel, createWord } from "./scenarioTestData";
import { ScenarioStep } from "../ScenarioStep";

Expand Down Expand Up @@ -51,7 +51,7 @@ describe("ScenarioStep", () => {
/>
);

expect(screen.getByText(word).children[0]).toHaveTextContent("");
expect(within(screen.getByText(word)).getByText("")).toBeInTheDocument();
}
);
});
4 changes: 2 additions & 2 deletions new/src/hooks/useFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export interface Filter {
status: ScenarioStatusFilter | undefined;
}

export function useFilters(): {filter: Filter, setUrlSearchParams: SetURLSearchParams} {
export function useFilters(): { filter: Filter; setUrlSearchParams: SetURLSearchParams } {
const [searchParams, setSearchParams] = useSearchParams();
const status = searchParams.get("status");

return {filter: { status: parseScenarioStatus(status) }, setUrlSearchParams: setSearchParams};
return { filter: { status: parseScenarioStatus(status) }, setUrlSearchParams: setSearchParams };
}

function parseScenarioStatus(status: string | null): ScenarioStatusFilter | undefined {
Expand Down

0 comments on commit ec69e4b

Please sign in to comment.