fix(frontend): fix LabelsLine, change grid to flex in FieldCardGrid

This commit is contained in:
sam 2022-11-20 22:43:21 +01:00
parent 671db409a1
commit 94cee93ccb
1 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ function LabelStatusIcon({ status }: { status: WordStatus }) {
}
function LabelsLine({ labels }: { labels: Name[] | Pronoun[] }) {
if (labels.length === 0) return <></>;
if (!labels?.length) return <></>;
const status = labels[0].status;
const text = labels
.map((label) =>
@ -227,7 +227,7 @@ function LabelLine({ label }: { label: Name | Pronoun }) {
function FieldCardGrid({ fields }: { fields: Field[] }) {
return (
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 py-2">
<div className="flex flex-col md:flex-row gap-4 py-2 [&>*]:flex-1">
{fields?.map((field, index) => (
<FieldCard field={field} key={index} />
))}