client: password modal fixes for protected posts

pull/65/head
Max Leiter 4 years ago
parent ead3b0af9d
commit f20fa72b6d
No known key found for this signature in database
GPG Key ID: A3512F2F2F17EBDA

@ -229,7 +229,7 @@ const Post = () => {
</ButtonDropdown>
</div>
</div>
<PasswordModal isOpen={passwordModalVisible} onClose={onClosePasswordModal} onSubmit={submitPassword} />
<PasswordModal creating={true} isOpen={passwordModalVisible} onClose={onClosePasswordModal} onSubmit={submitPassword} />
</div>
)
}

@ -3,7 +3,7 @@ import { Modal, Note, Spacer, Input } from "@geist-ui/core"
import { useState } from "react"
type Props = {
creating?: boolean
creating: boolean
isOpen: boolean
onClose: () => void
onSubmit: (password: string) => void

@ -63,6 +63,7 @@ const Post = () => {
const onClose = () => {
setIsPasswordModalOpen(false);
router.push("/");
}
if (!router.isReady) {

Loading…
Cancel
Save