client: password modal fixes for protected posts
This commit is contained in:
parent
ead3b0af9d
commit
f20fa72b6d
4 changed files with 4 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -32,7 +32,7 @@ export type Migration = typeof umzug._types.migration
|
|||
|
||||
// If you're in a development environment, you can manually migrate with `yarn migrate:{up,down}` in the `server` folder
|
||||
if (config.is_production) {
|
||||
; (async () => {
|
||||
;(async () => {
|
||||
// Checks migrations and run them if they are not already applied. To keep
|
||||
// track of the executed migrations, a table (and sequelize model) called SequelizeMeta
|
||||
// will be automatically created (if it doesn't exist already) and parsed.
|
||||
|
|
Loading…
Reference in a new issue