Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit b02247e

Browse files
authored
chore: code style (#149)
1 parent e46c6c0 commit b02247e

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

packages/client/components/AssetListItem.vue

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,15 @@ const props = defineProps<{
44
}>()
55
66
const icon = computed(() => {
7-
if (props.asset.type === 'image')
8-
return 'i-carbon-image'
9-
if (props.asset.type === 'video')
10-
return 'i-carbon-video'
11-
if (props.asset.type === 'audio')
12-
return 'i-carbon-volume-up'
13-
if (props.asset.type === 'font')
14-
return 'i-carbon-text-small-caps'
15-
if (props.asset.type === 'text')
16-
return 'i-carbon-document'
17-
if (props.asset.type === 'json')
18-
return 'i-carbon-json'
19-
return 'i-carbon-document-blank'
7+
const assets = {
8+
image: 'i-carbon-image',
9+
video: 'i-carbon-video',
10+
audio: 'i-carbon-volume-up',
11+
font: 'i-carbon-text-small-caps',
12+
text: 'i-carbon-document',
13+
json: 'i-carbon-json',
14+
}
15+
return assets[props.asset.type] ?? 'i-carbon-document-blank'
2016
})
2117
</script>
2218

0 commit comments

Comments
 (0)