[Glitch] Change design of modal loading and error screens in web UI
Port 7f2cfcccab to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
170f76c82c
commit
64fc79cbc2
7 files changed
+117
-233
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { useHovering } from '@/hooks/useHovering';
|
||||
import { autoPlayGif } from 'flavours/glitch/initial_state';
|
||||
|
||||
export const GIF: React.FC<{
|
||||
src: string;
|
||||
staticSrc: string;
|
||||
className: string;
|
||||
animate?: boolean;
|
||||
}> = ({ src, staticSrc, className, animate = autoPlayGif }) => {
|
||||
const { hovering, handleMouseEnter, handleMouseLeave } = useHovering(animate);
|
||||
|
||||
return (
|
||||
<img
|
||||
className={className}
|
||||
src={hovering || animate ? src : staticSrc}
|
||||
alt=''
|
||||
role='presentation'
|
||||
onMouseEnter={handleMouseEnter}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user