icns-frontend/pages/index.tsx
2022-11-30 22:49:09 +09:00

16 lines
374 B
TypeScript

import styles from "../styles/Home.module.css";
export default function Home() {
const handleSigninWithTwitter = async () => {
const { authUrl } = await (await fetch("/api/auth")).json();
window.open(authUrl);
};
return (
<div className={styles.container}>
<button onClick={handleSigninWithTwitter}>Sign in with Twitter</button>
</div>
);
}