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