mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-30 16:33:19 -04:00
title order
This commit is contained in:
@@ -20,9 +20,6 @@ function classNames(...classes) {
|
||||
export function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) {
|
||||
const meta = useMemo(() => getMetadata(pattern.code), [pattern]);
|
||||
let title = meta.title;
|
||||
if (title == null) {
|
||||
title == pattern.hash;
|
||||
}
|
||||
if (title == null) {
|
||||
const date = new Date(pattern.created_at);
|
||||
if (isNaN(date)) {
|
||||
@@ -30,6 +27,9 @@ export function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) {
|
||||
}
|
||||
title = date.toLocaleDateString();
|
||||
}
|
||||
if (title == null) {
|
||||
title = pattern.hash;
|
||||
}
|
||||
if (title == null) {
|
||||
title = 'unnamed';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user