Add LogoutCountdown to HandleEdit
This commit is contained in:
@@ -5,6 +5,7 @@ import {useRef} from 'react'
|
||||
import FormHandler from '../form-handler.js'
|
||||
import {formatFormContent} from '@/lib/format.js'
|
||||
import {createVersion} from '@/lib/directus.js'
|
||||
import LogoutCountdown from '@/components/session/logout-countdown.js'
|
||||
|
||||
export default function HandleEdit({
|
||||
id,
|
||||
@@ -45,6 +46,7 @@ export default function HandleEdit({
|
||||
|
||||
if (collection === 'titres') {
|
||||
return (
|
||||
<>
|
||||
<FormHandler
|
||||
handleFormSubmit={handleFormSubmit}
|
||||
session={session}
|
||||
@@ -58,11 +60,14 @@ export default function HandleEdit({
|
||||
dialogText='Modifiez le titre'
|
||||
label='titre'
|
||||
/>
|
||||
<LogoutCountdown ref={countdownRef} setError={setError} setIsErrorAlertOpen={setIsErrorAlertOpen} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
if (collection === 'articles') {
|
||||
return (
|
||||
<>
|
||||
<FormHandler
|
||||
handleFormSubmit={handleFormSubmit}
|
||||
session={session}
|
||||
@@ -76,6 +81,8 @@ export default function HandleEdit({
|
||||
dialogText='Modifiez l’article'
|
||||
label='titre'
|
||||
/>
|
||||
<LogoutCountdown ref={countdownRef} setError={setError} setIsErrorAlertOpen={setIsErrorAlertOpen} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user