Echo f4fb7d6b7a [Glitch] Profile editing: Rearranging and adding fields
Port eb848d082afc8864b2aa15858f414e4867902c65 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2026-03-07 17:30:14 +01:00

30 lines
776 B
TypeScript

import type { FC } from 'react';
import { EmojiHTML } from '@/flavours/glitch/components/emoji/html';
import type { useElementHandledLink } from '@/flavours/glitch/components/status/handled_link';
import type { FieldData } from '@/flavours/glitch/reducers/slices/profile_edit';
import classes from '../styles.module.scss';
export const AccountField: FC<
FieldData & Partial<ReturnType<typeof useElementHandledLink>>
> = ({ onElement, ...field }) => {
return (
<>
<EmojiHTML
as='h2'
htmlString={field.name}
className={classes.fieldName}
onElement={onElement}
/>
<EmojiHTML
as='p'
htmlString={field.value}
className={classes.fieldValue}
onElement={onElement}
/>
</>
);
};