Skip to content

Commit

Permalink
Sort artists alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan19 committed May 30, 2024
1 parent 1d8113b commit bae287b
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 3 deletions.
56 changes: 54 additions & 2 deletions api/routes/images.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"tags": [
"Triangulum Form"
],
"artist": "DRACOICE08",
"artist": "@DRACOICE08",
"published": "2022-05-29",
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/triangulum_form.webp",
"aspectRatio": 1.8250950570342206,
Expand Down Expand Up @@ -2844,13 +2844,65 @@
},
{
"tags": [
""
"Eclipse Deity"
],
"href": "",
"aspectRatio": 0.8243310619910255,
"parent": "Eclipse Deity v3",
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/eclipse_deity_v3/0.webp",
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/eclipse_deity_v3/0.webp",
"src": "https://alcorsiteartbucket.s3.amazonaws.com/eclipse_deity_v3/0.png"
},
{
"title": "Biogenesis Suit Design",
"artist": "@EmberWickArt",
"tags": [
"Superhero",
"Bodysuit"
],
"href": "https://x.com/EmberWickArt/status/1795127025331577256",
"published": "2024-05-27",
"aspectRatio": 1.0115606936416186,
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/biogenesis_suit_design.webp",
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/biogenesis_suit_design.webp",
"src": "https://alcorsiteartbucket.s3.amazonaws.com/biogenesis_suit_design.png"
},
{
"title": "Alan and Alcor",
"artist": "@kongzorim",
"tags": [
"Aldhibah Form",
"Rastaban Form",
"Standard Outfit"
],
"href": "https://x.com/kongzorim/status/1795818089080385818",
"published": "2024-05-29",
"aspectRatio": 0.7056150600454398,
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/alan_and_alcor.webp",
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/alan_and_alcor.webp",
"src": "https://alcorsiteartbucket.s3.amazonaws.com/alan_and_alcor.png"
},
{
"tags": [
"Rastaban Form",
"Standard Outfit"
],
"href": "",
"aspectRatio": 0.6218760142810775,
"parent": "Alan and Alcor",
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/alan_and_alcor/0.webp",
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/alan_and_alcor/0.webp",
"src": "https://alcorsiteartbucket.s3.amazonaws.com/alan_and_alcor/0.png"
},
{
"tags": [
"Aldhibah Form"
],
"href": "",
"aspectRatio": 0.38736913204998313,
"parent": "Alan and Alcor",
"thumbnailUrl": "https://alcorsiteartbucket.s3.amazonaws.com/600h/alan_and_alcor/1.webp",
"webp": "https://alcorsiteartbucket.s3.amazonaws.com/webp/alan_and_alcor/1.webp",
"src": "https://alcorsiteartbucket.s3.amazonaws.com/alan_and_alcor/1.png"
}
]
2 changes: 1 addition & 1 deletion src/components/gallery/UseTagHooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {useEffect, useState} from "react";
import images from './images.json'

export type TagState = { artists: Record<string, number>, tags: Record<ArtTag, number> };
export const artists = Array.from(new Set(images.filter(value => value.artist !== undefined && value.artist !== '').map<string>(imageData => imageData.artist as string)));
export const artists = Array.from(new Set(images.filter(value => value.artist !== undefined && value.artist !== '').map<string>(imageData => imageData.artist as string))).sort((a, b) => a.localeCompare(b));

/**
* Creates a new instance of a TagState, with all the tags disabled
Expand Down

0 comments on commit bae287b

Please sign in to comment.