How can we improve this snippet ?

 avatar
unknown
typescript
4 months ago
606 B
2
Indexable
const getComponentStructure = ({ queryParam = '', isDraft = false }) => {
  const client = new QueryClient();
  return (
    <QueryClientProvider client={client}>
      <MemoryRouter initialEntries={[`/subscriptions/TEST_LOCATION_GROUP_ID${queryParam || ''}`]}>
        <MantineProvider>
          <DropdownMenu>
            <BankPaymentItem isDraft={isDraft} locationGroupId="TEST_LOCATION_GROUP_ID" />
          </DropdownMenu>
        </MantineProvider>
      </MemoryRouter>
    </QueryClientProvider>
  );
};

const { getByTestId } = render(getComponentStructure({ queryParam: '', isDraft: false }));
Editor is loading...
Leave a Comment