2022-11-30 09:58:19 +00:00
|
|
|
import styles from "../styles/Home.module.css";
|
2022-11-30 08:11:45 +00:00
|
|
|
|
|
|
|
export default function Home() {
|
2022-11-30 13:49:09 +00:00
|
|
|
const handleSigninWithTwitter = async () => {
|
|
|
|
const { authUrl } = await (await fetch("/api/auth")).json();
|
|
|
|
|
|
|
|
window.open(authUrl);
|
|
|
|
};
|
|
|
|
|
2022-11-30 08:11:45 +00:00
|
|
|
return (
|
|
|
|
<div className={styles.container}>
|
2022-11-30 13:49:09 +00:00
|
|
|
<button onClick={handleSigninWithTwitter}>Sign in with Twitter</button>
|
2022-11-30 08:11:45 +00:00
|
|
|
</div>
|
2022-11-30 09:58:19 +00:00
|
|
|
);
|
2022-11-30 08:11:45 +00:00
|
|
|
}
|