mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
Merge branch 'fix/transfer-to-laying' into 'development'
[FIX/FE] Transfer to Laying See merge request mbugroup/lti-web-client!269
This commit is contained in:
@@ -49,6 +49,8 @@ const TransferToLayingFormModal = () => {
|
||||
const modalAction = searchParams.get('action');
|
||||
const transferToLayingId = searchParams.get('id');
|
||||
|
||||
const isModalActionForForm = modalAction === 'add' || modalAction === 'edit';
|
||||
|
||||
const { mutate } = useSWRConfig();
|
||||
|
||||
const refreshTransferToLayings = () => {
|
||||
@@ -60,7 +62,7 @@ const TransferToLayingFormModal = () => {
|
||||
|
||||
const { data: transferToLaying, isLoading: isLoadingTransferToLaying } =
|
||||
useSWR(
|
||||
transferToLayingId
|
||||
isModalActionForForm && transferToLayingId
|
||||
? ['detail-transfer-to-laying', transferToLayingId]
|
||||
: undefined,
|
||||
([, id]) => TransferToLayingApi.getSingle(Number(id))
|
||||
|
||||
Reference in New Issue
Block a user