mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
* 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>
19 lines
477 B
TypeScript
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}
|
|
/>
|
|
);
|
|
};
|