You've already forked factorio-sites
mirror of
https://github.com/barthuijgen/factorio-sites.git
synced 2025-11-27 23:18:35 +02:00
change default search or newest first
This commit is contained in:
@@ -118,7 +118,11 @@ export const BlueprintTile: React.FC<BlueprintTileProps> = ({
|
||||
<Box className="block">
|
||||
<div className="image">
|
||||
{imageError ? (
|
||||
<div>The image is not generated yet.</div>
|
||||
<div
|
||||
data-src={`https://storage.factorio.tools/factorio-blueprint-images/thumbnail/${blueprint.image_hash}.webp`}
|
||||
>
|
||||
The image is not generated yet.
|
||||
</div>
|
||||
) : (
|
||||
<Image
|
||||
loader={({ src }) => src}
|
||||
|
||||
@@ -169,7 +169,7 @@ export const Index: NextPage<IndexProps> = ({
|
||||
<Box>
|
||||
<RadioGroup
|
||||
onChange={(value: string) => updateSearch({ order: value })}
|
||||
value={(router.query.order as string) || "favorites"}
|
||||
value={(router.query.order as string) || "date"}
|
||||
>
|
||||
<Stack>
|
||||
<Radio value="favorites">Favorites</Radio>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user