mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Fix link rendering for RenderInlineModel (#10311)
This commit is contained in:
		| @@ -15,7 +15,7 @@ import { type ReactNode, useCallback } from 'react'; | |||||||
| import { ModelInformationDict } from '@lib/enums/ModelInformation'; | import { ModelInformationDict } from '@lib/enums/ModelInformation'; | ||||||
| import { ModelType } from '@lib/enums/ModelType'; | import { ModelType } from '@lib/enums/ModelType'; | ||||||
| import { apiUrl } from '@lib/functions/Api'; | import { apiUrl } from '@lib/functions/Api'; | ||||||
| import { navigateToLink } from '@lib/functions/Navigation'; | import { getBaseUrl, navigateToLink } from '@lib/functions/Navigation'; | ||||||
| import type { | import type { | ||||||
|   ModelRendererDict, |   ModelRendererDict, | ||||||
|   RenderInstanceProps |   RenderInstanceProps | ||||||
| @@ -219,7 +219,10 @@ export function RenderInlineModel({ | |||||||
|         {prefix} |         {prefix} | ||||||
|         {image && <Thumbnail src={image} size={18} />} |         {image && <Thumbnail src={image} size={18} />} | ||||||
|         {url ? ( |         {url ? ( | ||||||
|           <Anchor href='' onClick={(event: any) => onClick(event)}> |           <Anchor | ||||||
|  |             href={`/${getBaseUrl()}${url}`} | ||||||
|  |             onClick={(event: any) => onClick(event)} | ||||||
|  |           > | ||||||
|             {primary} |             {primary} | ||||||
|           </Anchor> |           </Anchor> | ||||||
|         ) : ( |         ) : ( | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user