feat(frontend): show user profile fields
This commit is contained in:
parent
4ba28bbfde
commit
4732451040
7 changed files with 95 additions and 55 deletions
25
Foxnouns.Frontend/app/components/ProfileField.tsx
Normal file
25
Foxnouns.Frontend/app/components/ProfileField.tsx
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { CustomPreference, FieldEntry, Pronoun } from "~/lib/api/user";
|
||||
import StatusLine from "~/components/StatusLine";
|
||||
|
||||
export default function ProfileField({
|
||||
name,
|
||||
entries,
|
||||
preferences,
|
||||
}: {
|
||||
name: string;
|
||||
entries: Array<FieldEntry | Pronoun>;
|
||||
preferences: Record<string, CustomPreference>;
|
||||
}) {
|
||||
return (
|
||||
<div className="col">
|
||||
<h3>{name}</h3>
|
||||
<ul className="list-unstyled fs-5">
|
||||
{entries.map((e, i) => (
|
||||
<li key={i}>
|
||||
<StatusLine entry={e} preferences={preferences} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue