Skip to content

Commit ed679ac

Browse files
committed
fix: update rating display logic in ExifPanel
- Changed the conditional rendering of the rating display to use a ternary operator for better clarity. - Ensured that the rating is only displayed when it is greater than zero, improving the component's robustness. Signed-off-by: Innei <tukon479@gmail.com>
1 parent 5295b10 commit ed679ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/src/components/ui/photo-viewer/ExifPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ export const ExifPanel: FC<{
128128
value={formattedExifData.colorSpace}
129129
/>
130130
)}
131-
{formattedExifData?.rating && formattedExifData.rating > 0 && (
131+
{formattedExifData?.rating && formattedExifData.rating > 0 ? (
132132
<Row
133133
label={t('exif.rating')}
134134
value={'★'.repeat(formattedExifData.rating)}
135135
/>
136-
)}
136+
) : null}
137137

138138
{formattedExifData?.dateTime && (
139139
<Row

0 commit comments

Comments
 (0)