Fix restart DB TS error (#38256)

* Fix restart DB TS error

* Update apps/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx

Co-authored-by: Paweł Gulbinowicz <zamotany@users.noreply.github.com>

---------

Co-authored-by: Paweł Gulbinowicz <zamotany@users.noreply.github.com>
This commit is contained in:
Joshen LimandPaweł Gulbinowicz authored and GitHub committed 2025-08-28 11:09:37 +07:00
1 parent ad9aa0eaa1
commit ba23f2f032
1 file changed
+10 -7
+10 -7
View File
@@ -81,17 +81,20 @@ export function setProjectStatus(
projectRef: Project['ref'],
status: Project['status']
) {
client.setQueriesData<Project[] | undefined>(
client.setQueriesData<PaginatedProjectsResponse | undefined>(
projectKeys.list(),
(old) => {
if (!old) return old
return old.map((project) => {
if (project.ref === projectRef) {
return { ...project, status }
}
return project
})
return {
...old,
projects: old.projects.map((project) => {
if (project.ref === projectRef) {
return { ...project, status }
}
return project
}),
}
},
{ updatedAt: Date.now() }
)