mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-14 15:23:10 -05:00
Fix lint
This commit is contained in:
parent
b7e2cd21bc
commit
d9080914e1
|
|
@ -31,7 +31,7 @@ export function MobileNav({
|
|||
})}
|
||||
to={navItem.disabled ? "/" : navItem.name}
|
||||
onClick={closeMenu}
|
||||
data-cy={`mobile-nav-link-${navItem}`}
|
||||
data-cy={`mobile-nav-link-${navItem.name}`}
|
||||
>
|
||||
<img
|
||||
className={clsx("layout__mobile-nav__link__icon", {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export const Layout = React.memo(function Layout({
|
|||
disabled: navItem.disabled,
|
||||
})}
|
||||
to={navItem.disabled ? "/" : navItem.name}
|
||||
data-cy={`nav-link-${navItem}`}
|
||||
data-cy={`nav-link-${navItem.name}`}
|
||||
>
|
||||
<img
|
||||
src={layoutIcon(navItem.name.replace(" ", ""))}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ export function setUpAuth(app: Express): void {
|
|||
return passport.authenticate("discord")(req, res);
|
||||
});
|
||||
app.get("/auth/discord/callback", (req, res) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const returnTo = req.session?.returnTo ?? process.env.FRONT_PAGE_URL;
|
||||
if (req.session?.returnTo) {
|
||||
delete req.session.returnTo;
|
||||
|
|
@ -130,6 +131,7 @@ export function setUpAuth(app: Express): void {
|
|||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
|
||||
return passport.authenticate("discord", {
|
||||
failureRedirect: "/login",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
successRedirect: returnTo,
|
||||
})(req, res);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user