delete browse page for now

This commit is contained in:
Felix Roos 2024-01-14 00:02:27 +01:00
parent 204c964050
commit 5314c83534
3 changed files with 10 additions and 71 deletions

View file

@ -16,8 +16,8 @@ import {
useSettings,
} from '../../settings.mjs';
import * as tunes from '../tunes.mjs';
import { PatternLabel } from '../../components/SharedPatterns';
import { useStore } from '@nanostores/react';
import { getMetadata } from '../../metadata_parser';
function classNames(...classes) {
return classes.filter(Boolean).join(' ');
@ -167,3 +167,12 @@ export function PatternsTab({ context }) {
</div>
);
}
export function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) {
const meta = useMemo(() => getMetadata(pattern.code), [pattern]);
return (
<>
{pattern.id}. {meta.title || pattern.hash} by {meta.by.join(',') || 'Anonymous'}
</>
);
}