diff --git a/app/forms/idp/create.tsx b/app/forms/idp/create.tsx
index 995e78bc3..d02243efb 100644
--- a/app/forms/idp/create.tsx
+++ b/app/forms/idp/create.tsx
@@ -57,7 +57,7 @@ export function CreateIdpSideModalForm() {
addToast({
content: (
<>
- IDP {idp.name} created
+ IdP {idp.name} created
>
),
})
diff --git a/app/forms/subnet-create.tsx b/app/forms/subnet-create.tsx
index 5ed229999..de0592aeb 100644
--- a/app/forms/subnet-create.tsx
+++ b/app/forms/subnet-create.tsx
@@ -20,7 +20,9 @@ import {
useCustomRouterItems,
} from '~/components/form/fields/useItemsList'
import { SideModalForm } from '~/components/form/SideModalForm'
+import { HLs } from '~/components/HL'
import { useVpcSelector } from '~/hooks/use-params'
+import { addToast } from '~/stores/toast'
import { FormDivider } from '~/ui/lib/Divider'
import { pb } from '~/util/path-builder'
@@ -42,9 +44,16 @@ export function CreateSubnetForm() {
const onDismiss = () => navigate(pb.vpcSubnets(vpcSelector))
const createSubnet = useApiMutation('vpcSubnetCreate', {
- onSuccess() {
+ onSuccess(subnet) {
queryClient.invalidateQueries('vpcSubnetList')
onDismiss()
+ addToast({
+ content: (
+ <>
+ Subnet {subnet.name} created
+ >
+ ),
+ })
},
})
diff --git a/app/pages/project/vpcs/RouterPage.tsx b/app/pages/project/vpcs/RouterPage.tsx
index 43083be5b..1374602b3 100644
--- a/app/pages/project/vpcs/RouterPage.tsx
+++ b/app/pages/project/vpcs/RouterPage.tsx
@@ -21,7 +21,7 @@ import {
type RouteTarget,
} from '~/api'
import { DocsPopover } from '~/components/DocsPopover'
-import { HL, HLs } from '~/components/HL'
+import { HL } from '~/components/HL'
import { MoreActionsMenu } from '~/components/MoreActionsMenu'
import { routeFormMessage } from '~/forms/vpc-router-route-common'
import { getVpcRouterSelector, useVpcRouterSelector } from '~/hooks/use-params'
@@ -88,15 +88,10 @@ export function RouterPage() {
})
const { mutateAsync: deleteRouterRoute } = useApiMutation('vpcRouterRouteDelete', {
- onSuccess(_data, variables) {
+ onSuccess() {
apiQueryClient.invalidateQueries('vpcRouterRouteList')
- addToast({
- content: (
- <>
- Route {variables.path.route} deleted
- >
- ),
- })
+ // We only have the ID, so will show a generic confirmation message
+ addToast({ content: 'Route deleted' })
},
})
diff --git a/app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx b/app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx
index dda1540f6..93e848a90 100644
--- a/app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx
+++ b/app/pages/project/vpcs/VpcPage/tabs/VpcSubnetsTab.tsx
@@ -46,8 +46,10 @@ export function VpcSubnetsTab() {
const { Table } = useQueryTable('vpcSubnetList', { query: vpcSelector })
const { mutateAsync: deleteSubnet } = useApiMutation('vpcSubnetDelete', {
- onSuccess() {
+ onSuccess(a, b) {
+ console.log(a, b)
queryClient.invalidateQueries('vpcSubnetList')
+ // We only have the ID, so will show a generic confirmation message
addToast({ content: 'Subnet deleted' })
},
})
diff --git a/app/pages/system/silos/SiloIpPoolsTab.tsx b/app/pages/system/silos/SiloIpPoolsTab.tsx
index 81aef8d4c..b19a51ba8 100644
--- a/app/pages/system/silos/SiloIpPoolsTab.tsx
+++ b/app/pages/system/silos/SiloIpPoolsTab.tsx
@@ -81,6 +81,8 @@ export function SiloIpPoolsTab() {
const { mutateAsync: unlinkPool } = useApiMutation('ipPoolSiloUnlink', {
onSuccess() {
queryClient.invalidateQueries('siloIpPoolList')
+ // We only have the ID, so will show a generic confirmation message
+ addToast({ content: 'IP pool unlinked' })
},
})