1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed swiper re-rendering

This commit is contained in:
Fedor Katurov 2021-03-30 11:24:15 +07:00
parent 158de7b24c
commit 805cde559b
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ const NodeImageSwiperBlock: FC<IProps> = ({ node }) => {
} }
return ( return (
<div className={styles.wrapper} key={node.id}> <div className={styles.wrapper}>
<Swiper <Swiper
initialSlide={0} initialSlide={0}
slidesPerView="auto" slidesPerView="auto"

View file

@ -17,7 +17,7 @@ export const useNodeBlocks = (node: INode, isLoading: boolean) => {
createElement(block, { createElement(block, {
node, node,
isLoading, isLoading,
key, key: `${node.id}-${key}`,
}), }),
[node, isLoading] [node, isLoading]
); );