From f757cbf80df69f1f8fb480bb205e7ee23a4ab75b Mon Sep 17 00:00:00 2001 From: Bart Huijgen Date: Mon, 18 Nov 2024 21:25:58 +0100 Subject: [PATCH] change default search or newest first --- apps/blueprints/src/components/BlueprintTile.tsx | 6 +++++- apps/blueprints/src/pages/index.tsx | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/blueprints/src/components/BlueprintTile.tsx b/apps/blueprints/src/components/BlueprintTile.tsx index e9ce45e..0005dac 100644 --- a/apps/blueprints/src/components/BlueprintTile.tsx +++ b/apps/blueprints/src/components/BlueprintTile.tsx @@ -118,7 +118,11 @@ export const BlueprintTile: React.FC = ({
{imageError ? ( -
The image is not generated yet.
+
+ The image is not generated yet. +
) : ( src} diff --git a/apps/blueprints/src/pages/index.tsx b/apps/blueprints/src/pages/index.tsx index 2d383b9..11660da 100644 --- a/apps/blueprints/src/pages/index.tsx +++ b/apps/blueprints/src/pages/index.tsx @@ -169,7 +169,7 @@ export const Index: NextPage = ({ updateSearch({ order: value })} - value={(router.query.order as string) || "favorites"} + value={(router.query.order as string) || "date"} > Favorites @@ -262,7 +262,7 @@ export const getServerSideProps = pageHandler(async ({ query }, { session }) => await init(); const page = Number(query.page || "1"); const perPage = Number(query["per-page"] || "20"); - const order = (query["order"] as string) || "favorites"; + const order = (query["order"] as string) || "date"; const _query = query.q ? String(query.q) : undefined; const tags = query.tags ? String(query.tags).split(",") : undefined; const entities = query.entities ? String(query.entities).split(",") : undefined;