Refine admin tag display
This commit is contained in:
parent
cddabc6180
commit
712c4ba6d3
@ -20,12 +20,13 @@ export default async function AdminPhotosPage() {
|
||||
<AdminGrid>
|
||||
{tags.map(({ tag, count }) =>
|
||||
<Fragment key={tag}>
|
||||
<div>
|
||||
<div className="pr-2">
|
||||
{tag}
|
||||
</div>
|
||||
<div className="text-dim">
|
||||
{photoQuantityText(count, false)}
|
||||
</div>
|
||||
<div />
|
||||
<FormWithConfirm
|
||||
action={deletePhotoTagGloballyAction}
|
||||
confirmText={
|
||||
|
||||
@ -287,7 +287,7 @@ const sqlGetUniqueTags = async () => sql`
|
||||
const sqlGetUniqueTagsWithCount = async () => sql`
|
||||
SELECT DISTINCT unnest(tags) as tag, count(distinct id) as count FROM photos
|
||||
GROUP BY tag
|
||||
ORDER BY count ASC
|
||||
ORDER BY count DESC
|
||||
`.then(({ rows }) => rows.map(row => ({
|
||||
tag: row.tag as string,
|
||||
count: parseInt(row.count, 10),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user