Sort by creation date by default and subtler text color for context

This commit is contained in:
Marsn3 2025-02-14 07:47:00 +01:00
parent 2c531757ce
commit 22976ccc7a
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ export default function QuoteInfo({ quote }: QuoteInfoProps) {
//TODO: Bettes Colors
<div className="dark:bg-slate-800 shadow-(--box) m-1 p-2">
<p className="border-4 border-black bg-slate-300 text-black p-1 my-1">{quote.quote}</p>
{quote.context && <p className="border-4 border-black bg-slate-300 text-black p-1 my-1">{quote.context}</p>}
{quote.context && <p className="border-4 border-black bg-slate-300 text-slate-600 p-1 my-1">{quote.context}</p>}
<div className="flex flex-row">
<p className="bg-lime-400 text-zinc-800 p-1 border-4 border-r-2 border-black w-20">Author:</p>
<p className="bg-slate-300 border-4 border-l-2 border-black text-black p-1 grow">{quote.author}</p>

View file

@ -28,7 +28,7 @@ export default function QuoteList() {
})
const getQuotes = async () => {
try {
const records = await pb.collection(`${collection}`).getFullList<Quote>({ requestKey: null });
const records = await pb.collection(`${collection}`).getFullList<Quote>({ sort: "-created", requestKey: null });
setQuotes(records);
} catch (err: any) {
setError(err)