hide upload image button when user can not edit pack

This commit is contained in:
Ajay Bura 2025-01-15 17:39:48 +05:30
parent f4bf351743
commit 4618ab5cdc

View file

@ -330,8 +330,10 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
/>
</SequenceCard>
</Box>
{images.length === 0 && !canEdit ? null : (
<Box direction="Column" gap="100">
<Text size="L400">Images</Text>
{canEdit && (
<SequenceCard
style={{ padding: config.space.S300 }}
variant="SurfaceVariant"
@ -356,6 +358,7 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
}
/>
</SequenceCard>
)}
{files.map((file) => (
<SequenceCard
key={file.name}
@ -378,6 +381,7 @@ export const ImagePackContent = as<'div', ImagePackContentProps>(
{uploadedImages.map(renderImage)}
{images.map(renderImage)}
</Box>
)}
</Box>
);
}