mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 06:09:08 +03:00
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:
1 parent
ad9aa0eaa1
commit
ba23f2f032
1 file changed
+10
-7
@@ -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() }
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user