cleanup code
This commit is contained in:
parent
2280a776b3
commit
248d06decd
|
@ -48,7 +48,6 @@ export const RegisterForm = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async (event: Event) => {
|
const handleSubmit = async (event: Event) => {
|
||||||
console.log('!!! handleSubmit:', handleSubmit)
|
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
if (passwordError()) {
|
if (passwordError()) {
|
||||||
setValidationErrors((errors) => ({ ...errors, password: passwordError() }))
|
setValidationErrors((errors) => ({ ...errors, password: passwordError() }))
|
||||||
|
|
|
@ -184,10 +184,8 @@ export const EditorProvider = (props: { children: JSX.Element }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const saveDraft = async (draftForm: ShoutForm) => {
|
const saveDraft = async (draftForm: ShoutForm) => {
|
||||||
console.log("!!! draftForm:", draftForm);
|
|
||||||
const { error } = await updateShout(draftForm, { publish: false })
|
const { error } = await updateShout(draftForm, { publish: false })
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log("!!! error:", error);
|
|
||||||
snackbar?.showSnackbar({ type: 'error', body: localize?.t(error) || '' })
|
snackbar?.showSnackbar({ type: 'error', body: localize?.t(error) || '' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user