mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
(nextjs) fixed image preloaders for SSR
This commit is contained in:
parent
7e14b52bf9
commit
d30cad9caa
4 changed files with 27 additions and 2 deletions
|
@ -8,6 +8,7 @@ import { getURL, getURLFromString } from '~/utils/dom';
|
|||
import { useColorGradientFromString } from '~/hooks/color/useColorGradientFromString';
|
||||
import { Square } from '~/components/common/Square';
|
||||
import { useGotoNode } from '~/hooks/node/useGotoNode';
|
||||
import { ImageWithSSRLoad } from '~/components/common/ImageWithSSRLoad';
|
||||
|
||||
type IProps = {
|
||||
item: Partial<INode>;
|
||||
|
@ -89,7 +90,7 @@ const NodeRelatedItem: FC<IProps> = memo(({ item }) => {
|
|||
</div>
|
||||
)}
|
||||
|
||||
<img src={image} alt="loader" onLoad={() => setIsLoaded(true)} />
|
||||
<ImageWithSSRLoad src={image} alt="loader" onLoad={() => setIsLoaded(true)} />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue