mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-12 23:36:00 +00:00
feat(lib): add support for external images in items (#291)
* feat: add support for external images in items Add image_external field to Item type and update HeaderView to prefer external images over internal ones when available. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: prettier formatting for external image feature --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7e0d44dac8
commit
945e5b066a
@ -57,7 +57,9 @@ export function HeaderView({
|
||||
|
||||
const [imageLoaded, setImageLoaded] = useState(false)
|
||||
|
||||
const avatar = item.image && appState.assetsApi.url + item.image + '?width=160&heigth=160'
|
||||
const avatar =
|
||||
item.image_external ||
|
||||
(item.image && appState.assetsApi.url + item.image + '?width=160&heigth=160')
|
||||
const title = item.name
|
||||
const subtitle = item.subname
|
||||
|
||||
|
||||
1
lib/src/types/Item.d.ts
vendored
1
lib/src/types/Item.d.ts
vendored
@ -46,6 +46,7 @@ export interface Item {
|
||||
slug?: string
|
||||
user_created?: UserItem
|
||||
image?: string
|
||||
image_external?: string
|
||||
group_type?: string
|
||||
offers?: TagIds
|
||||
needs?: TagIds
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user