Clean up and typing
This commit is contained in:
@@ -15,8 +15,8 @@ import { useCommonHooks, useMutationAPI } from 'hooks';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { cardClasses, modalClasses, textInputClasses } from 'styles';
|
||||
|
||||
function DebouncedWolClient({ wolClient, handleDelete }: any) {
|
||||
const { theme, isMobile } = useCommonHooks();
|
||||
function DebouncedWolClient({ wolClient }: any) {
|
||||
const { theme, isMobile, modalStyle, handleDelete } = useCommonHooks();
|
||||
const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false);
|
||||
const { mutateAsync } = useMutationAPI();
|
||||
|
||||
@@ -47,14 +47,7 @@ function DebouncedWolClient({ wolClient, handleDelete }: any) {
|
||||
onClose={() => {
|
||||
closeModal();
|
||||
}}
|
||||
style={{
|
||||
'--color-text-pri': theme.primaryColor,
|
||||
'--color-text-acc': theme.accentColor,
|
||||
'--color-background': theme.backgroundColor,
|
||||
'--color-border': theme.borderColor,
|
||||
'--color-search-background': theme.searchColor,
|
||||
'--image-background': `url(${theme.backgroundImage})`,
|
||||
}}
|
||||
style={modalStyle}
|
||||
closeOnEscape
|
||||
closeOnClickOutside
|
||||
>
|
||||
@@ -84,7 +77,7 @@ function DebouncedWolClient({ wolClient, handleDelete }: any) {
|
||||
color={'red'}
|
||||
styles={{ label: { color: 'black' } }}
|
||||
onClick={() => {
|
||||
handleDelete(client);
|
||||
handleDelete(client, 'api/WolClients');
|
||||
closeModal();
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user