summaryrefslogtreecommitdiff
path: root/fig-frontend/client/src/components/login.ts
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-03-01 18:39:11 -0500
committerLLLL Colonq <llll@colonq>2024-03-01 18:39:11 -0500
commit88e2726fc1fc6cec2b9e63526ce4c0a1a04a2e98 (patch)
tree94fd56c8c02e422a54d69aa7dec798b7a55d6a2d /fig-frontend/client/src/components/login.ts
parent4a23754fc6515c947e0bbac38cd0e558b701fe2f (diff)
Add new frontend
Diffstat (limited to 'fig-frontend/client/src/components/login.ts')
-rw-r--r--fig-frontend/client/src/components/login.ts34
1 files changed, 0 insertions, 34 deletions
diff --git a/fig-frontend/client/src/components/login.ts b/fig-frontend/client/src/components/login.ts
deleted file mode 100644
index 195c97f..0000000
--- a/fig-frontend/client/src/components/login.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { html, css, LitElement } from "lit";
-import { customElement } from "lit/decorators.js";
-
-import * as Config from "../config";
-import * as Twitch from "../twitch";
-
-@customElement("fig-login")
-export class Login extends LitElement {
- static styles = css`
- `;
-
- login() {
- Twitch.startTwitchAuth();
- }
-
- async check() {
- const resp = await fetch(`${Config.API_URL}/check`);
- console.log(await resp.text());
- }
-
- render() {
- const token = Twitch.getAuthToken();
- console.log(token);
- if (token) {
- return html`
-<button @click=${this.check}>check token</button>
-`;
- } else {
- return html`
-<button @click=${this.login}>login</button>
-`;
- }
- }
-}