Skip to content

Commit

Permalink
Applied Required Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
renoseHarsh committed Aug 20, 2024
1 parent 2836b75 commit faf8e07
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions src/Components/Common/FilePreviewDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const FilePreviewDialog = (props: FilePreviewProps) => {
);
setIndex(index);
}
});
}, [uploadedFiles]);

const handleZoomIn = () => {
const checkFull = file_state.zoom === zoom_values.length;
Expand Down Expand Up @@ -158,16 +158,14 @@ const FilePreviewDialog = (props: FilePreviewProps) => {
</div>
</div>
<div className="flex flex-1 items-center justify-center gap-2">
<ButtonV2
className={
uploadedFiles && index === 0
? "pointer-events-none invisible opacity-0"
: ""
}
onClick={() => handleNext(index - 1)}
>
&lt;
</ButtonV2>
{uploadedFiles && (
<ButtonV2
disabled={index === 0}
onClick={() => handleNext(index - 1)}
>
&lt;
</ButtonV2>
)}
<div className="flex h-[75vh] w-full items-center justify-center overflow-scroll rounded-lg border border-secondary-200">
{file_state.isImage ? (
<img
Expand Down Expand Up @@ -203,16 +201,14 @@ const FilePreviewDialog = (props: FilePreviewProps) => {
</div>
)}
</div>
<ButtonV2
className={
uploadedFiles && index === uploadedFiles.length - 1
? "pointer-events-none invisible opacity-0"
: ""
}
onClick={() => handleNext(index + 1)}
>
&gt;
</ButtonV2>
{uploadedFiles && (
<ButtonV2
disabled={index === uploadedFiles!.length - 1}
onClick={() => handleNext(index + 1)}
>
&gt;
</ButtonV2>
)}
</div>
<div className="flex items-center justify-between">
<div className="mt-2 flex w-full flex-col justify-center gap-3 md:flex-row">
Expand Down

0 comments on commit faf8e07

Please sign in to comment.