mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 03:26:45 +00:00
(cherry picked from commit ae1f9bf2741f844d1efe1d602b76f86f486ed48d) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
91c095a011
commit
4c6e3490c0
@ -13,7 +13,7 @@ import {
|
||||
IconUsersGroup
|
||||
} from '@tabler/icons-react';
|
||||
import { type ReactNode, useMemo } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
|
||||
import AdminButton from '../../components/buttons/AdminButton';
|
||||
import {
|
||||
@ -66,6 +66,7 @@ export type CompanyDetailProps = {
|
||||
export default function CompanyDetail(props: Readonly<CompanyDetailProps>) {
|
||||
const { id } = useParams();
|
||||
|
||||
const navigate = useNavigate();
|
||||
const user = useUserState();
|
||||
|
||||
const {
|
||||
@ -283,7 +284,9 @@ export default function CompanyDetail(props: Readonly<CompanyDetailProps>) {
|
||||
url: ApiEndpoints.company_list,
|
||||
pk: company?.pk,
|
||||
title: t`Delete Company`,
|
||||
onFormSuccess: refreshInstance
|
||||
onFormSuccess: () => {
|
||||
navigate('/');
|
||||
}
|
||||
});
|
||||
|
||||
const companyActions = useMemo(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user