diff --git a/specifyweb/frontend/js_src/lib/components/Atoms/Icons.tsx b/specifyweb/frontend/js_src/lib/components/Atoms/Icons.tsx index 5d526e9bd26..cefe3fcb775 100644 --- a/specifyweb/frontend/js_src/lib/components/Atoms/Icons.tsx +++ b/specifyweb/frontend/js_src/lib/components/Atoms/Icons.tsx @@ -26,7 +26,6 @@ export const iconClassName = 'w-6 h-6 flex-shrink-0'; */ export const legacyNonJsxIcons = { arrowsExpand: ``, - ban: ``, link: ``, printer: ``, } as const; diff --git a/specifyweb/frontend/js_src/lib/components/Molecules/SvgIcon.tsx b/specifyweb/frontend/js_src/lib/components/Molecules/SvgIcon.tsx index 77bf5c00302..bc167939298 100644 --- a/specifyweb/frontend/js_src/lib/components/Molecules/SvgIcon.tsx +++ b/specifyweb/frontend/js_src/lib/components/Molecules/SvgIcon.tsx @@ -60,6 +60,8 @@ export function SvgIcon({ { - const tableIcon = mappings?.mappedHeaders?.[physicalCol]; - const isMapped = tableIcon !== undefined; + const tableIconUrl = mappings?.mappedHeaders?.[physicalCol]; + const isMapped = tableIconUrl !== undefined; const mappingCol = physicalColToMappingCol(physicalCol); const tableName = (typeof mappingCol === 'number' ? mappings?.tableNames[mappingCol] - : undefined) ?? tableIcon?.split('/').slice(-1)?.[0]?.split('.')?.[0]; - const tableLabel = isMapped - ? f.maybe(tableName, getTable)?.label ?? tableName ?? '' - : ''; - // REFACTOR: use new table icons + : undefined) ?? tableIconUrl?.split('/').at(-1)?.split('.')[0]; + return ReactDOMServer.renderToString( ); }, @@ -133,23 +128,17 @@ export function useHotProps({ function ColumnHeader({ isMapped, - tableLabel, - tableIcon, columnName, + tableName, }: { readonly isMapped: boolean; - readonly tableLabel: string; - readonly tableIcon: string | undefined; readonly columnName: string; + readonly tableName: string | undefined; }): JSX.Element { return ( - {isMapped ? ( - + {isMapped && tableName !== undefined ? ( + ) : (