Skip to content

Commit

Permalink
Revert "remove non-null-assertion"
Browse files Browse the repository at this point in the history
This reverts commit 52644d4.
  • Loading branch information
andrewHEguardian committed Jan 24, 2024
1 parent 7e0991a commit befb9c3
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions client/components/shared/SectionContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,9 @@ const divCss = (hasNav: boolean | undefined) => css`
}
`;

const defaultDispatch = (_value: SetStateAction<string | undefined>) => {
return;
};

export const SelectedTopicObjectContext =
createContext<Dispatch<SetStateAction<string | undefined>>>(
defaultDispatch,
);
export const SelectedTopicObjectContext = createContext<
Dispatch<SetStateAction<string | undefined>>
>(undefined!); // eslint-disable-line @typescript-eslint/no-non-null-assertion -- // TODO: refactor this var to remove need for disabling eslint rule

export const SectionContent = (props: SectionContentProps) => {
const [selectedTopicId, setSelectedTopicId] = useState<string | undefined>(
Expand Down

0 comments on commit befb9c3

Please sign in to comment.