-
Notifications
You must be signed in to change notification settings - Fork 22
Add citizen reporting web client template #926
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
web-citizen-reporting/web-citizen-reporting-template/src/pages/GuidesList.tsx
Fixed
Show fixed
Hide fixed
dce3727
to
bb51270
Compare
* created card for every form in form page * deleted span with lastModifiedOn data
web-citizen-reporting/web-citizen-reporting-template/src/pages/ReportingForm.tsx
Fixed
Show fixed
Hide fixed
* hide footer on thank you page * add notifications * fixes
* updating className properties for each of typographyClasses * removed redundant {" "} from text * renamed typographyClasses to just typography
web-citizen-reporting/web-citizen-reporting-template/src/components/ReportAnswersStep.tsx
Fixed
Show fixed
Hide fixed
web-citizen-reporting/web-citizen-reporting-template/src/components/ReportAnswersStep.tsx
Fixed
Show fixed
Hide fixed
web-citizen-reporting/web-citizen-reporting-template/src/components/ReportAnswersStep.tsx
Fixed
Show fixed
Hide fixed
web-citizen-reporting/web-citizen-reporting-template/src/components/ReportAnswersStep.tsx
Fixed
Show fixed
Hide fixed
web-citizen-reporting/web-citizen-reporting-template/src/components/ReportAnswersStep.tsx
Fixed
Show fixed
Hide fixed
web-citizen-reporting/web-citizen-reporting-template/src/components/ReportAnswersStep.tsx
Fixed
Show fixed
Hide fixed
@@ -0,0 +1,37 @@ | |||
import { API } from "@/api/api"; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the problem, we need to remove the unused API
import from the file. This will clean up the code and eliminate any confusion or potential maintenance issues related to unused imports.
- Remove the
import { API } from "@/api/api";
line from the file. - Ensure that no other parts of the code rely on this import (based on the provided snippet, this is already the case).
@@ -1,2 +1 @@ | ||
import { API } from "@/api/api"; | ||
import * as React from "react"; |
} | ||
|
||
export function useUploadFile({ defaultUploadedFiles }: UseUploadFileOptions) { | ||
const [uploadedFiles, setUploadedFiles] = React.useState<File[]>( |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the problem, we need to remove the unused setUploadedFiles
function. This involves removing the definition of setUploadedFiles
and any related commented-out code that references it. This will clean up the code and eliminate the unused variable.
- Remove the
setUploadedFiles
function definition from theuseUploadFile
function. - Remove the commented-out code that references
setUploadedFiles
.
-
Copy modified line R10 -
Copy modified lines R21-R22
@@ -9,3 +9,3 @@ | ||
export function useUploadFile({ defaultUploadedFiles }: UseUploadFileOptions) { | ||
const [uploadedFiles, setUploadedFiles] = React.useState<File[]>( | ||
const [uploadedFiles] = React.useState<File[]>( | ||
defaultUploadedFiles ?? [] | ||
@@ -20,4 +20,4 @@ | ||
try { | ||
// const res = await API.postForm(); | ||
// setUploadedFiles((prev) => (prev ? [...prev, ...res] : res)); | ||
// const res = await API.postForm(); | ||
// setUploadedFiles((prev) => (prev ? [...prev, ...res] : res)); | ||
} catch (err) { |
web-citizen-reporting/web-citizen-reporting-template/src/queries/use-locations.tsx
Fixed
Show fixed
Hide fixed
* added guide details component for text guideType * finished guide details page * Update NotificationDetails.tsx --------- Co-authored-by: Ion Dormenco <[email protected]>
web-citizen-reporting/web-citizen-reporting-template/src/components/ReportAnswersStep.tsx
Fixed
Show fixed
Hide fixed
…orm component (#960) * WIP: fix number inputs not validating and text, number and selection input losing the value when going back * fix form validation * add number input component * fetch formData inside route * call useLoaderData from the Route obj * WIP: add display logic for form questions * Wip/refactor inputs (#17) * start refactoring inputs * fix multiselect and add free text responses * refactor display logic check * refactor and set required only if field is displayed * refactor logic * add freeform text to single select input * add rating input
No description provided.