feat(frontend): add flags to user page
This commit is contained in:
parent
f539902711
commit
dc18ab60d2
10 changed files with 68 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
import { CustomPreference, FieldEntry, Pronoun } from "~/lib/api/user";
|
||||
import StatusLine from "~/components/StatusLine";
|
||||
import StatusLine from "~/components/profile/StatusLine";
|
||||
|
||||
export default function ProfileField({
|
||||
name,
|
28
Foxnouns.Frontend/app/components/profile/ProfileFlag.tsx
Normal file
28
Foxnouns.Frontend/app/components/profile/ProfileFlag.tsx
Normal file
|
@ -0,0 +1,28 @@
|
|||
import type { PrideFlag } from "~/lib/api/user";
|
||||
import { OverlayTrigger, Tooltip } from "react-bootstrap";
|
||||
|
||||
export default function ProfileFlag({ flag }: { flag: PrideFlag }) {
|
||||
return (
|
||||
<span className="mx-2 my-1">
|
||||
<OverlayTrigger
|
||||
key={flag.id}
|
||||
placement="top"
|
||||
overlay={
|
||||
<Tooltip id={flag.id} aria-hidden={true}>
|
||||
{flag.description ?? flag.name}
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
<span>
|
||||
<img
|
||||
className="pride-flag"
|
||||
src={flag.image_url}
|
||||
alt={flag.description ?? flag.name}
|
||||
style={{ pointerEvents: "none" }}
|
||||
/>
|
||||
</span>
|
||||
</OverlayTrigger>{" "}
|
||||
{flag.name}
|
||||
</span>
|
||||
);
|
||||
}
|
|
@ -7,8 +7,8 @@ import {
|
|||
Pronoun,
|
||||
} from "~/lib/api/user";
|
||||
import classNames from "classnames";
|
||||
import StatusIcon from "~/components/StatusIcon";
|
||||
import PronounLink from "~/components/PronounLink";
|
||||
import StatusIcon from "~/components/profile/StatusIcon";
|
||||
import PronounLink from "~/components/profile/PronounLink";
|
||||
|
||||
export default function StatusLine({
|
||||
entry,
|
Loading…
Add table
Add a link
Reference in a new issue