diff --git a/packages/manager/apps/pci-private-network/public/translations/listing/Messages_fr_FR.json b/packages/manager/apps/pci-private-network/public/translations/listing/Messages_fr_FR.json index 3de77d1f6d6d..b445d2224cfa 100644 --- a/packages/manager/apps/pci-private-network/public/translations/listing/Messages_fr_FR.json +++ b/packages/manager/apps/pci-private-network/public/translations/listing/Messages_fr_FR.json @@ -24,7 +24,5 @@ "pci_projects_project_network_private_subnet_create": "Créer un sous-réseau", "pci_projects_project_network_private_ip_version": "IP Version", "pci_projects_project_network_private_action": "Actions", - "pci_projects_project_network_private_subnet_show": "Voir les sous-réseaux", - "ACTIVE": "actif", - "DISABLED": "désactivé" + "pci_projects_project_network_private_subnet_show": "Voir les sous-réseaux" } diff --git a/packages/manager/apps/pci-private-network/src/components/status-info/StatusInfo.component.tsx b/packages/manager/apps/pci-private-network/src/components/status-info/StatusInfo.component.tsx index b626252a6bc3..a820f633f476 100644 --- a/packages/manager/apps/pci-private-network/src/components/status-info/StatusInfo.component.tsx +++ b/packages/manager/apps/pci-private-network/src/components/status-info/StatusInfo.component.tsx @@ -2,7 +2,6 @@ import { FC } from 'react'; import { ODS_CHIP_SIZE } from '@ovhcloud/ods-components'; import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming'; import { OsdsChip } from '@ovhcloud/ods-components/react'; -import { useTranslation } from 'react-i18next'; import { ResourceStatus } from '@/types/network.type'; const color = { @@ -11,19 +10,16 @@ const color = { }; const StatusInfo: FC<{ - label: ResourceStatus; -}> = ({ label }) => { - const { t } = useTranslation('listing'); - - return ( - - {t(label)} - - ); -}; + label: string; + status: ResourceStatus; +}> = ({ label, status }) => ( + + {label} + +); export default StatusInfo; diff --git a/packages/manager/apps/pci-private-network/src/data/hooks/networks/useNetworks.ts b/packages/manager/apps/pci-private-network/src/data/hooks/networks/useNetworks.ts index da66d8a1235e..33480099b030 100644 --- a/packages/manager/apps/pci-private-network/src/data/hooks/networks/useNetworks.ts +++ b/packages/manager/apps/pci-private-network/src/data/hooks/networks/useNetworks.ts @@ -177,8 +177,8 @@ export const useDeletePrivateNetwork = ({ networkId, onError, onSuccess, -}: DeletePrivateNetworkProps) => { - const mutation = useMutation({ +}: DeletePrivateNetworkProps) => + useMutation({ mutationFn: () => apiDeleteNetwork(projectId, region, networkId), onError, onSuccess: async () => { @@ -189,9 +189,3 @@ export const useDeletePrivateNetwork = ({ onSuccess(); }, }); - - return { - deletePrivateNetwork: () => mutation.mutate(), - ...mutation, - }; -}; diff --git a/packages/manager/apps/pci-private-network/src/hooks/useColumns/useColumns.tsx b/packages/manager/apps/pci-private-network/src/hooks/useColumns/useColumns.tsx index 1a128bd8e228..165ecd2c881b 100644 --- a/packages/manager/apps/pci-private-network/src/hooks/useColumns/useColumns.tsx +++ b/packages/manager/apps/pci-private-network/src/hooks/useColumns/useColumns.tsx @@ -185,6 +185,11 @@ export function usePrivateNetworkLZColumns() { diff --git a/packages/manager/apps/pci-private-network/src/pages/delete/DeleteNetwork.page.tsx b/packages/manager/apps/pci-private-network/src/pages/delete/DeleteNetwork.page.tsx index 1af435b19804..6152987e5893 100644 --- a/packages/manager/apps/pci-private-network/src/pages/delete/DeleteNetwork.page.tsx +++ b/packages/manager/apps/pci-private-network/src/pages/delete/DeleteNetwork.page.tsx @@ -18,7 +18,7 @@ export default function DeleteLocalZone() { const onClose = () => navigate('..'); - const { deletePrivateNetwork, isPending } = useDeletePrivateNetwork({ + const { mutate: deletePrivateNetwork, isPending } = useDeletePrivateNetwork({ projectId, region, networkId,