mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 10:15:26 +00:00
Use tabWidth 4 without actual tabs.
This commit is contained in:
@@ -8,25 +8,25 @@ import { OperationsContext } from "../../../context/revoltjs/RevoltClient";
|
||||
import { Form } from "./Form";
|
||||
|
||||
export function FormLogin() {
|
||||
const { login } = useContext(OperationsContext);
|
||||
const history = useHistory();
|
||||
const { login } = useContext(OperationsContext);
|
||||
const history = useHistory();
|
||||
|
||||
return (
|
||||
<Form
|
||||
page="login"
|
||||
callback={async (data) => {
|
||||
const browser = detect();
|
||||
let device_name;
|
||||
if (browser) {
|
||||
const { name, os } = browser;
|
||||
device_name = `${name} on ${os}`;
|
||||
} else {
|
||||
device_name = "Unknown Device";
|
||||
}
|
||||
return (
|
||||
<Form
|
||||
page="login"
|
||||
callback={async (data) => {
|
||||
const browser = detect();
|
||||
let device_name;
|
||||
if (browser) {
|
||||
const { name, os } = browser;
|
||||
device_name = `${name} on ${os}`;
|
||||
} else {
|
||||
device_name = "Unknown Device";
|
||||
}
|
||||
|
||||
await login({ ...data, device_name });
|
||||
history.push("/");
|
||||
}}
|
||||
/>
|
||||
);
|
||||
await login({ ...data, device_name });
|
||||
history.push("/");
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user