fixed
This commit is contained in:
parent
8867a843ac
commit
b531962b1f
3 changed files with 6 additions and 9 deletions
|
|
@ -27,14 +27,10 @@ export function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) {
|
|||
const date = new Date(pattern.created_at);
|
||||
if (!isNaN(date)) {
|
||||
title = date.toLocaleDateString();
|
||||
} else {
|
||||
title = 'unnamed';
|
||||
}
|
||||
}
|
||||
if (title == null) {
|
||||
title = pattern.hash;
|
||||
}
|
||||
if (title == null) {
|
||||
title = 'unnamed';
|
||||
}
|
||||
|
||||
const author = Array.isArray(meta.by) ? meta.by.join(',') : 'Anonymous';
|
||||
return <>{`${pattern.id}: ${title} by ${author.slice(0, 100)}`.slice(0, 60)}</>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue