[yagin]add condition render for viewer component

This commit is contained in:
yagin 2024-12-04 10:57:02 +07:00
parent 8b3cde536b
commit a6f6eb5a34

View File

@ -578,11 +578,11 @@ const ReviewPage = () => {
overflow: 'auto',
}}
>
<Viewer
{selectedFileData && <Viewer
plugins={[defaultLayoutPluginInstance]}
fileUrl={selectedFileData}
onDocumentLoad={() => setImageLoading(false)}
/>
/>}
</div>
) : (
<div
@ -756,8 +756,7 @@ const ReviewPage = () => {
>
<Input
size='middle'
value={`Sub: ${filterSubsidiaries}, Date:${
filterDateRange[0]
value={`Sub: ${filterSubsidiaries}, Date:${filterDateRange[0]
? filterDateRange[0] + ' to ' + filterDateRange[1]
: 'All'
}, Reviewed: ${filterReviewState}, Tests: ${filterIncludeTests}`}
@ -781,7 +780,7 @@ const ReviewPage = () => {
let shouldRevised = false;
try {
if (
selectedFileDataSource[data]?.[FEEDBACK_ACCURACY].length > 0
selectedFileDataSource[data]?.[FEEDBACK_ACCURACY]?.length > 0
) {
shouldRevised =
selectedFileDataSource[data][FEEDBACK_ACCURACY][0] < 1;