mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
fix: lottie import logic (#1526)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import React, { cloneElement, HTMLAttributes, useState } from 'react';
|
||||
import Lottie from 'react-lottie';
|
||||
|
||||
import * as edgelessHoverAnimationData from './animation-data/edgeless-hover.json';
|
||||
import * as pageHoverAnimationData from './animation-data/page-hover.json';
|
||||
import { StyledSwitchItem } from './style';
|
||||
|
||||
type HoverAnimateControllerProps = {
|
||||
@@ -49,7 +47,7 @@ export const PageSwitchItem = (
|
||||
options={{
|
||||
loop: false,
|
||||
autoplay: false,
|
||||
animationData: pageHoverAnimationData,
|
||||
animationData: require('./animation-data/page-hover.json'),
|
||||
rendererSettings: {
|
||||
preserveAspectRatio: 'xMidYMid slice',
|
||||
},
|
||||
@@ -68,7 +66,7 @@ export const EdgelessSwitchItem = (
|
||||
options={{
|
||||
loop: false,
|
||||
autoplay: false,
|
||||
animationData: edgelessHoverAnimationData,
|
||||
animationData: require('./animation-data/edgeless-hover.json'),
|
||||
rendererSettings: {
|
||||
preserveAspectRatio: 'xMidYMid slice',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user