-
Notifications
You must be signed in to change notification settings - Fork 26
Mobile #885
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
Fix/attachments duplicated
Update translations.json
fix: [report-issue-redirect] add router.back when the internet is off…
Update translations.json
* sort forms by display order * add labels to rating questions * add lastUpdatedAt for form submissions, psi , notes, attachments
This reverts commit 3ed1c1c.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| import FormQuestionListItem, { | ||
| FormQuestionListItemProps, | ||
| QuestionStatus, | ||
| } from "../../../../../../../components/FormQuestionListItem"; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 months ago
To fix the problem, we need to remove the unused import FormQuestionListItemProps from the import statement on line 15. This will clean up the code and eliminate the unnecessary import, improving code readability and maintainability.
| @@ -15,3 +15,2 @@ | ||
| import FormQuestionListItem, { | ||
| FormQuestionListItemProps, | ||
| QuestionStatus, |
| {time ? ( | ||
| <React.Fragment> | ||
| <Typography preset="body2" fontWeight="500" paddingBottom="$xxs"> | ||
| {time && |
Check warning
Code scanning / CodeQL
Useless conditional Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 months ago
To fix the problem, we need to remove the redundant condition time on line 152 and line 160. Since the code is already within a block that checks if time is truthy, these conditions are unnecessary and can be safely removed without changing the existing functionality.
-
Copy modified lines R152-R156 -
Copy modified lines R159-R162
| @@ -151,15 +151,13 @@ | ||
| <Typography preset="body2" fontWeight="500" paddingBottom="$xxs"> | ||
| {time && | ||
| time.toLocaleDateString(["en-GB"], { | ||
| month: "2-digit", | ||
| day: "2-digit", | ||
| year: "numeric", | ||
| })} | ||
| {time.toLocaleDateString(["en-GB"], { | ||
| month: "2-digit", | ||
| day: "2-digit", | ||
| year: "numeric", | ||
| })} | ||
| </Typography> | ||
| <Typography preset="heading" fontWeight="500"> | ||
| {time && | ||
| time.toLocaleTimeString([], { | ||
| hour: "2-digit", | ||
| minute: "2-digit", | ||
| })} | ||
| {time.toLocaleTimeString([], { | ||
| hour: "2-digit", | ||
| minute: "2-digit", | ||
| })} | ||
| </Typography> |
| })} | ||
| </Typography> | ||
| <Typography preset="heading" fontWeight="500"> | ||
| {time && |
Check warning
Code scanning / CodeQL
Useless conditional Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 months ago
To fix the problem, we need to remove the redundant condition time && on line 160. This will simplify the code and remove the useless conditional without changing the existing functionality. The same applies to the condition on line 152.
-
Copy modified line R152 -
Copy modified line R159
| @@ -151,4 +151,3 @@ | ||
| <Typography preset="body2" fontWeight="500" paddingBottom="$xxs"> | ||
| {time && | ||
| time.toLocaleDateString(["en-GB"], { | ||
| {time.toLocaleDateString(["en-GB"], { | ||
| month: "2-digit", | ||
| @@ -159,4 +158,3 @@ | ||
| <Typography preset="heading" fontWeight="500"> | ||
| {time && | ||
| time.toLocaleTimeString([], { | ||
| {time.toLocaleTimeString([], { | ||
| hour: "2-digit", |
| if (file.type === "image") { | ||
| resultCompression = await Image.compress(file.uri); | ||
| } else if (file.type === "video") { | ||
| Video.activateBackgroundTask() |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 months ago
To fix the problem, we need to add an explicit semicolon at the end of the line Video.activateBackgroundTask(). This will ensure that the statement is correctly terminated and prevent any unintended behavior due to JavaScript's automatic semicolon insertion.
-
Copy modified line R101
| @@ -100,3 +100,3 @@ | ||
| } else if (file.type === "video") { | ||
| Video.activateBackgroundTask() | ||
| Video.activateBackgroundTask(); | ||
| resultCompression = await Video.compress(file.uri, { progressDivider: 10, }, onCompressionProgressCallback); |
| } else if (file.type === "video") { | ||
| Video.activateBackgroundTask() | ||
| resultCompression = await Video.compress(file.uri, { progressDivider: 10, }, onCompressionProgressCallback); | ||
| Video.deactivateBackgroundTask() |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 months ago
To fix the problem, we need to add an explicit semicolon at the end of the Video.deactivateBackgroundTask() statement. This will ensure consistency with the rest of the code and prevent any potential issues related to automatic semicolon insertion.
- Locate the line
Video.deactivateBackgroundTask()in the filemobile/hooks/useCamera.tsx. - Add a semicolon at the end of this line to make the semicolon explicit.
-
Copy modified line R103
| @@ -102,3 +102,3 @@ | ||
| resultCompression = await Video.compress(file.uri, { progressDivider: 10, }, onCompressionProgressCallback); | ||
| Video.deactivateBackgroundTask() | ||
| Video.deactivateBackgroundTask(); | ||
| } |
No description provided.