mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
32 lines
613 B
TypeScript
32 lines
613 B
TypeScript
import "./App.css";
|
|
import {
|
|
UserEventSignIn,
|
|
SignInPayloadPB,
|
|
} from "../services/backend/events/flowy-user";
|
|
import { nanoid } from "nanoid";
|
|
|
|
|
|
function App() {
|
|
async function greet() {
|
|
let make_payload = () =>
|
|
SignInPayloadPB.fromObject({
|
|
email: nanoid(4) + "@gmail.com",
|
|
password: "A!@123abc",
|
|
name: "abc",
|
|
});
|
|
await UserEventSignIn(make_payload());
|
|
}
|
|
|
|
return (
|
|
<div className="container">
|
|
<h1>Welcome to AppFlowy!</h1>
|
|
|
|
<button type="button" onClick={() => greet()}>
|
|
Sign in
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default App;
|