about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/blurhash.js
AgeCommit message (Collapse)Author
2023-02-20Rename JSX files with proper `.jsx` extension (#23733)Renaud Chaput
2020-07-09Improve safety of Blurhash component (#14278)Sasha Sorokin
There was a missed empty hash check. As well as rendering is now wrapped in try/catch block, so app won't crash if any Blurhash component fails to render its contents as it's not that critical.
2020-07-09Replace repetitive blurhash code with component (#14267)Sasha Sorokin
This commit replaces all unnecessarily repeated code for decoding and embedding blurhash canvases with separate component - <Blurhash>. Under the hood Blurhash component will use effect dependent on its props. This gives a few benefits: it will only be re-rendered whenever the hash or width/height/dummy props update, and will not render if canvas won't get to the final DOM, because then effect won't fire, which prevents weird bugs like #14257.