Skip to content

Commit 3417ecb

Browse files
Fix linter errors and remove obsolete updateProjectVisibility mutation
1 parent 3432a89 commit 3417ecb

3 files changed

Lines changed: 1 addition & 16 deletions

File tree

frontend/src/pages/Project/Details/Settings/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export const ProjectSettings: React.FC = () => {
224224
{t('projects.edit.project_visibility_description')}
225225
</Box>
226226
<Toggle
227-
checked={data.is_public}
227+
checked={data.isPublic}
228228
onChange={(detail) => changeVisibilityHandler(detail.detail.checked)}
229229
disabled={!isProjectManager(data)}
230230
>

frontend/src/pages/Project/Details/index.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ export const ProjectDetails: React.FC = () => {
5050

5151
return (
5252
<Button
53-
<<<<<<< HEAD
5453
onClick={() => handleLeaveProject(project.project_name, userData.username!, () => navigate(ROUTES.PROJECT.LIST))}
55-
=======
56-
onClick={() => handleLeaveProject(project.project_name, userData.username!)}
57-
>>>>>>> 7b42ba10 (refactor: use useProjectMemberActions in ProjectDetails)
5854
disabled={isMemberActionLoading || !canLeave}
5955
variant="normal"
6056
>

frontend/src/services/project.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ export const projectApi = createApi({
8585
invalidatesTags: (result, error, params) => [{ type: 'Projects' as const, id: params?.project_name }],
8686
}),
8787

88-
updateProjectVisibility: builder.mutation<IProject, { project_name: string; is_public: boolean }>({
89-
query: ({ project_name, is_public }) => ({
90-
url: API.PROJECTS.UPDATE_VISIBILITY(project_name),
91-
method: 'POST',
92-
body: { is_public },
93-
}),
94-
95-
invalidatesTags: (result, error, params) => [{ type: 'Projects' as const, id: params?.project_name }],
96-
}),
97-
9888
deleteProjects: builder.mutation<void, IProject['project_name'][]>({
9989
query: (projectNames) => ({
10090
url: API.PROJECTS.DELETE(),
@@ -154,7 +144,6 @@ export const {
154144
useUpdateProjectMembersMutation,
155145
useAddProjectMemberMutation,
156146
useRemoveProjectMemberMutation,
157-
useUpdateProjectVisibilityMutation,
158147
useDeleteProjectsMutation,
159148
useGetProjectLogsQuery,
160149
useGetProjectReposQuery,

0 commit comments

Comments
 (0)