Fix LogoutCountdown in HandleCreate
This commit is contained in:
@@ -82,6 +82,7 @@ export default function HandleCreate({
|
||||
|
||||
if (collection === 'titres') {
|
||||
return (
|
||||
<>
|
||||
<FormHandler
|
||||
session={session}
|
||||
isOpen={isOpen}
|
||||
@@ -98,11 +99,14 @@ export default function HandleCreate({
|
||||
dialogText='Écrivez votre titre'
|
||||
label='titre'
|
||||
/>
|
||||
<LogoutCountdown ref={countdownRef} setError={setError} setIsErrorAlertOpen={setIsErrorAlertOpen} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
if (collection === 'commentaires') {
|
||||
return (
|
||||
<>
|
||||
<FormHandler
|
||||
session={session}
|
||||
selectedTitre={selectedTitre}
|
||||
@@ -119,11 +123,14 @@ export default function HandleCreate({
|
||||
dialogText='Écrivez votre commentaire'
|
||||
label='commentaire'
|
||||
/>
|
||||
<LogoutCountdown ref={countdownRef} setError={setError} setIsErrorAlertOpen={setIsErrorAlertOpen} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
if (collection === 'articles') {
|
||||
return (
|
||||
<>
|
||||
<FormHandler
|
||||
session={session}
|
||||
isOpen={isOpen}
|
||||
@@ -140,10 +147,10 @@ export default function HandleCreate({
|
||||
dialogText='Écrivez votre article'
|
||||
label='article'
|
||||
/>
|
||||
<LogoutCountdown ref={countdownRef} setError={setError} setIsErrorAlertOpen={setIsErrorAlertOpen} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
return <LogoutCountdown ref={countdownRef} setError={setError} setIsErrorAlertOpen={setIsErrorAlertOpen} />
|
||||
}
|
||||
|
||||
HandleCreate.propTypes = {
|
||||
|
||||
Reference in New Issue
Block a user