forked from abner/for-legacy-web
chore: fix build errors
This commit is contained in:
@@ -29,7 +29,6 @@ export function CreateBotModal({ onClose, onCreate }: Props) {
|
||||
try {
|
||||
const { bot } = await client.bots.create({ name });
|
||||
onCreate(bot);
|
||||
onClose();
|
||||
} catch (err) {
|
||||
setError(takeError(err));
|
||||
}
|
||||
@@ -43,7 +42,10 @@ export function CreateBotModal({ onClose, onCreate }: Props) {
|
||||
{
|
||||
confirmation: true,
|
||||
palette: "accent",
|
||||
onClick: handleSubmit(onSubmit),
|
||||
onClick: async () => {
|
||||
await handleSubmit(onSubmit);
|
||||
return true;
|
||||
},
|
||||
children: <Text id="app.special.modals.actions.create" />,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -74,7 +74,10 @@ export function ModifyAccountModal({ onClose, field }: Props) {
|
||||
actions={[
|
||||
{
|
||||
confirmation: true,
|
||||
onClick: handleSubmit(onSubmit),
|
||||
onClick: async () => {
|
||||
await handleSubmit(onSubmit);
|
||||
return true;
|
||||
},
|
||||
children:
|
||||
field === "email" ? (
|
||||
<Text id="app.special.modals.actions.send_email" />
|
||||
|
||||
@@ -26,7 +26,7 @@ export function UserPicker(props: Props) {
|
||||
actions={[
|
||||
{
|
||||
children: <Text id="app.special.modals.actions.ok" />,
|
||||
onClick: () => props.callback(selected).then(props.onClose),
|
||||
onClick: () => props.callback(selected).then(() => true),
|
||||
},
|
||||
]}>
|
||||
<div className={styles.list}>
|
||||
|
||||
Reference in New Issue
Block a user