diff --git a/backend/src/events/router.py b/backend/src/events/router.py index f420e13c..495b0280 100644 --- a/backend/src/events/router.py +++ b/backend/src/events/router.py @@ -51,6 +51,7 @@ def get_events( if limit is not None: event_query = event_query.limit(limit) if offset is not None: + offset = max(0, offset) event_query = event_query.offset(offset) event_query = event_query.order_by(Event.rating.desc(), Event.date.desc()) diff --git a/frontend/app/(authenticated)/bookmarks/page.tsx b/frontend/app/(authenticated)/bookmarks/page.tsx index 11b02822..b978e632 100644 --- a/frontend/app/(authenticated)/bookmarks/page.tsx +++ b/frontend/app/(authenticated)/bookmarks/page.tsx @@ -36,7 +36,7 @@ const Page = ({ params }: { params: { id: string } }) => { const pageStr = searchParams.get("page"); - const page = isNumeric(pageStr) ? parseInt(pageStr!) : 1; + const page = isNumeric(pageStr) && pageStr !== "0" ? parseInt(pageStr!) : 1; const [categoryName, setCategoryName] = useState(""); // eslint-disable-line diff --git a/frontend/app/(unauthenticated)/login/page.tsx b/frontend/app/(unauthenticated)/login/page.tsx index dbaa7eef..b33bed32 100644 --- a/frontend/app/(unauthenticated)/login/page.tsx +++ b/frontend/app/(unauthenticated)/login/page.tsx @@ -134,7 +134,7 @@ function LoginPage() { -
+

Not registered yet?

Create an account diff --git a/frontend/app/(unauthenticated)/register/page.tsx b/frontend/app/(unauthenticated)/register/page.tsx index bf26b26e..d93748b6 100644 --- a/frontend/app/(unauthenticated)/register/page.tsx +++ b/frontend/app/(unauthenticated)/register/page.tsx @@ -139,7 +139,7 @@ function RegisterPage() { {/* Login button */} -
+

Already have an account?

diff --git a/frontend/app/(unauthenticated)/reset-password/_components/reset-password-create-request-form.tsx b/frontend/app/(unauthenticated)/reset-password/_components/reset-password-create-request-form.tsx index 3e2b5842..93a3a81a 100644 --- a/frontend/app/(unauthenticated)/reset-password/_components/reset-password-create-request-form.tsx +++ b/frontend/app/(unauthenticated)/reset-password/_components/reset-password-create-request-form.tsx @@ -103,7 +103,7 @@ export default function ResetPasswordCreateRequestForm() { -
+

Not registered yet?

Create an account diff --git a/frontend/components/layout/content-layout.tsx b/frontend/components/layout/content-layout.tsx index d07befb9..768ae381 100644 --- a/frontend/components/layout/content-layout.tsx +++ b/frontend/components/layout/content-layout.tsx @@ -3,6 +3,7 @@ import { ReactNode } from "react"; import { usePathname } from "next/navigation"; +import { LoadingSpinner } from "@/components/ui/loading-spinner"; import useBreakpointMediaQuery from "@/hooks/use-breakpoint-media-query"; import { useUserStore } from "@/store/user/user-store-provider"; import { MediaBreakpoint } from "@/utils/media"; @@ -42,8 +43,8 @@ const ContentLayout = ({ isLoading, children }: ContentLayoutProps) => { // TODO: fix all loading elements if (isLoading) return ( -
- loading +
+
);