-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feature: Configuration variable editor (WIP) #449
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -14,6 +14,7 @@ | |||
import { useSWRConfig } from 'swr'; | |||
import clsx from 'clsx'; | |||
import { TeamsComponent } from '@gitroom/frontend/components/settings/teams.component'; | |||
import { IntegretionTags } from '@gitroom/frontend/components/settings/integration-tags.component'; |
Check warning
Code scanning / ESLint
Disallow unused variables Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 3 hours ago
To fix the problem, we need to remove the unused import statement for IntegretionTags
. This will resolve the ESLint error and clean up the code. The change should be made in the file apps/frontend/src/components/layout/settings.component.tsx
by deleting the line that imports IntegretionTags
.
@@ -16,3 +16,2 @@ | ||
import { TeamsComponent } from '@gitroom/frontend/components/settings/teams.component'; | ||
import { IntegretionTags } from '@gitroom/frontend/components/settings/integration-tags.component'; | ||
import { useUser } from '@gitroom/frontend/components/layout/user.context'; |
import { useFetch } from '@gitroom/helpers/utils/custom.fetch'; | ||
import { useMemo } from 'react'; | ||
import { classValidatorResolver } from '@hookform/resolvers/class-validator'; | ||
import { SaveConfigurationVariableDto, SaveConfigurationVariablesDto } from '@gitroom/nestjs-libraries/dtos/settings/configuration-variables.dto.ts'; |
Check warning
Code scanning / ESLint
Disallow unused variables Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 3 hours ago
To fix the problem, we need to remove the unused import SaveConfigurationVariablesDto
from the file apps/frontend/src/components/settings/configuration-variable-editor.component.tsx
. This will resolve the ESLint error and clean up the code.
- Locate the import statement on line 7.
- Remove the
SaveConfigurationVariablesDto
from the import statement.
-
Copy modified line R7
@@ -6,3 +6,3 @@ | ||
import { classValidatorResolver } from '@hookform/resolvers/class-validator'; | ||
import { SaveConfigurationVariableDto, SaveConfigurationVariablesDto } from '@gitroom/nestjs-libraries/dtos/settings/configuration-variables.dto.ts'; | ||
import { SaveConfigurationVariableDto } from '@gitroom/nestjs-libraries/dtos/settings/configuration-variables.dto.ts'; | ||
|
|
||
const form = useForm({ resolver, values: { message: '' } }); | ||
|
||
const { data, mutate } = useFetch(`/configuration-variables/all`); |
Check warning
Code scanning / ESLint
Disallow unused variables Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 3 hours ago
To fix the problem, we need to remove the unused data
variable from the code. This involves modifying the line where data
is destructured from the useFetch
hook. We will only keep the mutate
function, which is actually used in the submit
function.
-
Copy modified line R49
@@ -48,3 +48,3 @@ | ||
|
||
const { data, mutate } = useFetch(`/configuration-variables/all`); | ||
const { mutate } = useFetch(`/configuration-variables/all`); | ||
|
No description provided.