File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import type { Row } from '@tanstack/react-table';
55import type {
66 TreeRowData ,
77} from '@src/taxonomy/tree-table/types' ;
8- import type { TagListRowData } from './types' ;
98import { getTagListRowData } from './utils' ;
109
1110const UsageCountDisplay = ( { row } : { row : Row < TreeRowData > ; } ) => {
Original file line number Diff line number Diff line change @@ -176,9 +176,11 @@ const useEditActions = ({
176176
177177 const getAxiosErrorMessage = ( axiosError : AxiosError ) => {
178178 const responseData = axiosError . response ?. data ;
179- const tagError = responseData ? Object . entries ( responseData ) ?. find ( ( errItem : [ string , unknown ] ) => (
180- [ 'tag' , 'value' , 'updated_tag_value' ] . includes ( errItem [ 0 ] . toLowerCase ( ) )
181- ) ) : null ;
179+ const tagError = responseData ?
180+ Object . entries ( responseData ) ?. find ( ( errItem : [ string , unknown ] ) => (
181+ [ 'tag' , 'value' , 'updated_tag_value' ] . includes ( errItem [ 0 ] . toLowerCase ( ) )
182+ ) ) :
183+ null ;
182184
183185 const errorMessages = tagError ? tagError [ 1 ] : (
184186 axiosError . message || intl . formatMessage ( globalMessages . unknownError )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { TagListRowData } from './types';
66 *
77 * Minimal getter function for `row.original`. Mainly because the naming of `original` is not expressive,
88 * and it needs to be cast to the correct type.
9- */
9+ */
1010export const getTagListRowData = ( row : Row < TreeRowData > ) : TagListRowData => (
1111 row . original as unknown as TagListRowData
1212) ;
Original file line number Diff line number Diff line change @@ -86,9 +86,7 @@ const DraftRow: React.FC<DraftRowProps> = ({
8686 < td aria-label = "Usage Count" >
8787 { row ? < UsageCountDisplay row = { row } /> : null }
8888 </ td >
89- < td
90- className = "tree-table-create-row-actions-cell p-2"
91- >
89+ < td className = "tree-table-create-row-actions-cell p-2" >
9290 < span className = "d-flex justify-content-end" >
9391 < span className = "mr-2" >
9492 < Button
You can’t perform that action at this time.
0 commit comments