fix: multiple error
This commit is contained in:
@@ -140,7 +140,7 @@ export function Demos() {
|
||||
setDetails(null)
|
||||
setDetailsLoading(true)
|
||||
try {
|
||||
const res = await api.getDemoDetails(d.username)
|
||||
const res = await api.getDemoDetails(d.namespace)
|
||||
setDetails(res)
|
||||
} catch (err) {
|
||||
const msg = err instanceof ApiError ? err.message : 'Erreur'
|
||||
@@ -156,10 +156,10 @@ export function Demos() {
|
||||
useEffect(() => {
|
||||
const current = demos.find((d) => d.id === expandedId)
|
||||
if (!current) return
|
||||
const username = current.username
|
||||
const namespace = current.namespace
|
||||
const id = setInterval(() => {
|
||||
api
|
||||
.getDemoDetails(username)
|
||||
.getDemoDetails(namespace)
|
||||
.then(setDetails)
|
||||
.catch(() => {
|
||||
/* échec silencieux : on garde le dernier état connu affiché */
|
||||
|
||||
Reference in New Issue
Block a user