Skip to content

Conversation

@idormenco
Copy link
Contributor

No description provided.

luciatugui and others added 30 commits August 20, 2024 11:38
feat B294: display html text in inbox messages
fix B297: add mime type for audio file and map icon with separate fun…
feat [#628]: remove kebab menu with MPS everywhere except observation screen
fix [B296]: extract last note text and display notes in desc order
radulescuandrew and others added 26 commits November 4, 2024 14:24
fix: [report-issue-redirect] add router.back when the internet is off…
* sort forms by display order
* add labels to rating questions
* add lastUpdatedAt for form submissions, psi , notes, attachments
@vercel
Copy link

vercel bot commented Mar 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
votemonitor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 6, 2025 1:44pm

Comment on lines +15 to +18
import FormQuestionListItem, {
FormQuestionListItemProps,
QuestionStatus,
} from "../../../../../../../components/FormQuestionListItem";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import FormQuestionListItemProps.

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.

Suggested changeset 1
mobile/app/(observer)/(app)/(drawer)/(tabs)/(observation)/form-details/[formId].tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/mobile/app/(observer)/(app)/(drawer)/(tabs)/(observation)/form-details/[formId].tsx b/mobile/app/(observer)/(app)/(drawer)/(tabs)/(observation)/form-details/[formId].tsx
--- a/mobile/app/(observer)/(app)/(drawer)/(tabs)/(observation)/form-details/[formId].tsx
+++ b/mobile/app/(observer)/(app)/(drawer)/(tabs)/(observation)/form-details/[formId].tsx
@@ -15,3 +15,2 @@
 import FormQuestionListItem, {
-  FormQuestionListItemProps,
   QuestionStatus,
EOF
@@ -15,3 +15,2 @@
import FormQuestionListItem, {
FormQuestionListItemProps,
QuestionStatus,
Copilot is powered by AI and may make mistakes. Always verify output.
{time ? (
<React.Fragment>
<Typography preset="body2" fontWeight="500" paddingBottom="$xxs">
{time &&

Check warning

Code scanning / CodeQL

Useless conditional Warning

This use of variable 'time' always evaluates to true.

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.

Suggested changeset 1
mobile/components/TimeSelect.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/mobile/components/TimeSelect.tsx b/mobile/components/TimeSelect.tsx
--- a/mobile/components/TimeSelect.tsx
+++ b/mobile/components/TimeSelect.tsx
@@ -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>
EOF
@@ -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>
Copilot is powered by AI and may make mistakes. Always verify output.
})}
</Typography>
<Typography preset="heading" fontWeight="500">
{time &&

Check warning

Code scanning / CodeQL

Useless conditional Warning

This use of variable 'time' always evaluates to true.

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.

Suggested changeset 1
mobile/components/TimeSelect.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/mobile/components/TimeSelect.tsx b/mobile/components/TimeSelect.tsx
--- a/mobile/components/TimeSelect.tsx
+++ b/mobile/components/TimeSelect.tsx
@@ -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",
EOF
@@ -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",
Copilot is powered by AI and may make mistakes. Always verify output.
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

Avoid automated semicolon insertion (90% of all statements in
the enclosing function
have an explicit semicolon).

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.

Suggested changeset 1
mobile/hooks/useCamera.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/mobile/hooks/useCamera.tsx b/mobile/hooks/useCamera.tsx
--- a/mobile/hooks/useCamera.tsx
+++ b/mobile/hooks/useCamera.tsx
@@ -100,3 +100,3 @@
         } else if (file.type === "video") {
-          Video.activateBackgroundTask()
+          Video.activateBackgroundTask();
           resultCompression = await Video.compress(file.uri, { progressDivider: 10, }, onCompressionProgressCallback);
EOF
@@ -100,3 +100,3 @@
} else if (file.type === "video") {
Video.activateBackgroundTask()
Video.activateBackgroundTask();
resultCompression = await Video.compress(file.uri, { progressDivider: 10, }, onCompressionProgressCallback);
Copilot is powered by AI and may make mistakes. Always verify output.
} 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

Avoid automated semicolon insertion (90% of all statements in
the enclosing function
have an explicit semicolon).

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 file mobile/hooks/useCamera.tsx.
  • Add a semicolon at the end of this line to make the semicolon explicit.
Suggested changeset 1
mobile/hooks/useCamera.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/mobile/hooks/useCamera.tsx b/mobile/hooks/useCamera.tsx
--- a/mobile/hooks/useCamera.tsx
+++ b/mobile/hooks/useCamera.tsx
@@ -102,3 +102,3 @@
           resultCompression = await Video.compress(file.uri, { progressDivider: 10, }, onCompressionProgressCallback);
-          Video.deactivateBackgroundTask()
+          Video.deactivateBackgroundTask();
         }
EOF
@@ -102,3 +102,3 @@
resultCompression = await Video.compress(file.uri, { progressDivider: 10, }, onCompressionProgressCallback);
Video.deactivateBackgroundTask()
Video.deactivateBackgroundTask();
}
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants