mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Experiment memoizing avatars
This commit is contained in:
parent
4c4e89ac9d
commit
47c2efacfb
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,8 @@ import './avatar.css';
|
|||
|
||||
import { useRef } from 'preact/hooks';
|
||||
|
||||
import mem from '../utils/mem';
|
||||
|
||||
const SIZES = {
|
||||
s: 16,
|
||||
m: 20,
|
||||
|
@ -90,4 +92,4 @@ function Avatar({ url, size, alt = '', squircle, ...props }) {
|
|||
);
|
||||
}
|
||||
|
||||
export default Avatar;
|
||||
export default mem(Avatar);
|
||||
|
|
Loading…
Reference in a new issue