Files
outline/shared/components/CustomEmoji.tsx
2e0bc66ad1 Fix React Doctor error-level issues (#11483)
* Initial plan

* Fix React Doctor errors: aria-selected, key props, alt attributes, layout animation, nested component, reduced motion

Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>

* Fix remaining React Doctor errors: refactor useTrackLastVisitedPath to avoid useEffect

Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>

* Revert useMeasure change

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2026-02-18 19:47:56 -05:00

19 lines
477 B
TypeScript

import useShare from "@shared/hooks/useShare";
type Props = React.ImgHTMLAttributes<HTMLImageElement> & {
value: string;
size?: number | string;
};
export const CustomEmoji = ({ value, size = 16, ...props }: Props) => {
const { shareId } = useShare();
return (
<img
alt=""
src={`/api/emojis.redirect?id=${value}${shareId ? `&shareId=${shareId}` : ""}`}
style={{ width: size, height: size, objectFit: "contain" }}
{...props}
/>
);
};