fix: useSigitProfiles dep, map item keys warnining, sign button styles, placeholder, optional button label #160

Merged
enes merged 7 commits from fix-collection-21-8 into staging 2024-08-21 11:15:45 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 3c230e6fb4 - Show all commits

View File

@ -9,13 +9,15 @@ interface FileListProps {
currentFile: CurrentUserFile
setCurrentFile: (file: CurrentUserFile) => void
handleDownload: () => void
downloadLabel?: string
}
const FileList = ({
files,
currentFile,
setCurrentFile,
handleDownload
handleDownload,
downloadLabel
}: FileListProps) => {
const isActive = (file: CurrentUserFile) => file.id === currentFile.id
return (
@ -41,7 +43,7 @@ const FileList = ({
</ul>
</div>
<Button variant="contained" fullWidth onClick={handleDownload}>
Download Files
{downloadLabel ? downloadLabel : 'Download Files'}

You can probably use the ?? operator. Should Download Files be a constant?

You can probably use the `??` operator. Should `Download Files` be a constant?
Outdated
Review

|| (logical OR) should be used instead of ?? (Nullish Coalescing).
With ?? if downloadLabel is blank string it will return blank but with || we will get default value Download Files

`||` (logical OR) should be used instead of `??` (Nullish Coalescing). With `??` if downloadLabel is blank string it will return blank but with `||` we will get default value `Download Files`
</Button>
</div>
)

View File

@ -538,6 +538,7 @@ export const VerifyPage = () => {
currentFile={currentFile}
setCurrentFile={setCurrentFile}
handleDownload={handleExport}
downloadLabel="Download Sigit"
/>
)}
{displayExportedBy()}