Skip to content

Commit

Permalink
Fixes WindowBox, and login
Browse files Browse the repository at this point in the history
  • Loading branch information
EtherCD committed Aug 19, 2024
1 parent 762e006 commit c73a117
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/WindowBox/WindowBox.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
@keyframes windowContentClose {
0% {
transform: scaleY(1);
max-height: 400px;
max-height: 450px;
max-width: 400px;
background-color: var(--window-background-selected);
}
Expand Down Expand Up @@ -87,7 +87,7 @@
}
100% {
background-color: var(--window-background-selected);
max-height: 400px;
max-height: 450px;
}
}

Expand Down
19 changes: 13 additions & 6 deletions src/pages/Auth/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { useEffect } from "preact/hooks"
import { useEffect } from "preact/hooks";
import { config } from "../../config";

export function Login() {
useEffect(() => {
window.location.replace(config.url.api + '/login/discord');
})
const redirectUrl = new URLSearchParams({
client_id: config.discord.clientId,
redirect_uri: config.discord.redirectUri,
response_type: "code",
scope: config.discord.scope.join(" "),
});

return null;
}
useEffect(() => {
window.location.replace(`https://discord.com/api/oauth2/authorize?${redirectUrl}`);
});

return null;
}

0 comments on commit c73a117

Please sign in to comment.