Skip to content

Commit

Permalink
fix: better animation adjustement height
Browse files Browse the repository at this point in the history
Signed-off-by: clegirar <[email protected]>
  • Loading branch information
clegirar committed Jan 14, 2025
1 parent 86ac782 commit 1d6ed94
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions packages/screens/Rakki/RakkiScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ import { layout } from "@/utils/style/layout";

export const RakkiScreen: ScreenFC<"Rakki"> = () => {
const networkId = useSelectedNetworkId();
const { height } = useMaxResolution();
const { height, width } = useMaxResolution();
const { rakkiInfo } = useRakkiInfo(networkId);
const [isLottie, setIsLottie] = useState<boolean>(false);

// Lottie animation is in a square
const lottieAnimationHeight = width;

const launchAnimation = () => {
setIsLottie(true);
};
Expand Down Expand Up @@ -98,28 +101,35 @@ export const RakkiScreen: ScreenFC<"Rakki"> = () => {
source={require("../../../assets/lottie/confetti-lottie.json")}
autoPlay
loop
webStyle={{ position: "absolute", height, width: "100%", top: 0 }}
webStyle={{
position: "absolute",
height: lottieAnimationHeight,
width: "100%",
top: 0,
}}
/>

<LottieView
source={require("../../../assets/lottie/confetti-lottie.json")}
autoPlay
loop
webStyle={{
position: "absolute",
height,
width: "100%",
top: height / 2,
height: lottieAnimationHeight,
top: lottieAnimationHeight / 2,
}}
/>

<LottieView
source={require("../../../assets/lottie/confetti-lottie.json")}
autoPlay
loop
webStyle={{
position: "absolute",
height: lottieAnimationHeight,
width: "100%",
height,
top: height,
top: lottieAnimationHeight,
}}
/>
</View>
Expand Down

0 comments on commit 1d6ed94

Please sign in to comment.