Skip to content

Commit

Permalink
fixing small bug with link on logo on auth layout
Browse files Browse the repository at this point in the history
  • Loading branch information
DonKoko committed Mar 6, 2024
1 parent 83c161f commit 1598f75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/routes/_auth+/_auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function App() {
<main className="flex size-full">
<div className="flex size-full flex-col items-center justify-center p-6 lg:p-10">
<div className=" mb-8 text-center">
<Link to="/">
<Link to="/" reloadDocument>
<img
src="/static/images/shelf-symbol.png"
alt="Shelf symbol"
Expand Down
6 changes: 5 additions & 1 deletion app/routes/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import type { LoaderFunctionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";

export const loader = async () => redirect("/assets");
export const loader = async ({ context }: LoaderFunctionArgs) => {
if (context.isAuthenticated) return redirect("/assets");
return redirect("/login");
};

export default function Route() {
return null;
Expand Down

0 comments on commit 1598f75

Please sign in to comment.