-
Notifications
You must be signed in to change notification settings - Fork 341
feat(metadata-sidebar): Pass isLargeFile to MetadataInstanceForm #3922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
08b7d76 to
24266ac
Compare
src/elements/content-sidebar/__tests__/isFileLargerThan.test.tsx
Outdated
Show resolved
Hide resolved
| import { type BoxItem } from '../../../common/types/core'; | ||
|
|
||
| export function isFileLargerThan(file: BoxItem, breakpoint: number): boolean { | ||
| return file ? file.size > breakpoint : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: file is required param so maybe you dont need the ternary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tjuanitas I've adjusted typing here - file can also be null is useSidebarMetadataFetcher is still processing, so we need to take care of this scenario here.
cf6cb7b to
6ff1b28
Compare
385a560
6ff1b28 to
385a560
Compare
385a560 to
d1b4493
Compare
Check if file is bigger that 1MB and pass
isLargeFiletoMetadataInstanceFormso that Large File Warning Inline Notice can be displayed.