Skip to content

Commit 05f6d77

Browse files
committed
fix: fix review issues
1 parent 7dfd643 commit 05f6d77

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.storybook/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from "path";
1+
import path from "path";
22
import { fileURLToPath } from "url";
33
import type { StorybookConfig } from "@storybook/react-webpack5";
44

src/components/AnimatedPlanet/hooks/useAnimatedPlane.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { easings, SpringRef, SpringValue, useSpring } from "react-spring";
22

3-
interface AnimatedPlaneTrailReturnType {
3+
interface AnimatedPlaneReturnType {
44
props: { opacity: SpringValue<number>; offsetDistance: SpringValue<string> };
55
api: SpringRef<{ opacity: number; offsetDistance: string }>;
66
}
77

8-
export const useAnimatedPlane = (delay: number, duration: number): AnimatedPlaneTrailReturnType => {
8+
export const useAnimatedPlane = (delay: number, duration: number): AnimatedPlaneReturnType => {
99
const [props, api] = useSpring(() => ({
1010
from: { opacity: 0, offsetDistance: "0%" },
1111
to: { opacity: 1, offsetDistance: "100%" },

src/components/AnimatedPlanet/hooks/useAnimatedStar.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { easings, SpringRef, SpringValue, useSpring } from "react-spring";
22

3-
interface AnimatedPlaneTrailReturnType {
3+
interface AnimatedStarReturnType {
44
props: { scale: SpringValue<number>; rotateZ: SpringValue<number> };
55
api: SpringRef<{ scale: number; rotateZ: number }>;
66
}
77

8-
export const useAnimatedStar = (delay: number, duration: number): AnimatedPlaneTrailReturnType => {
8+
export const useAnimatedStar = (delay: number, duration: number): AnimatedStarReturnType => {
99
const [props, api] = useSpring(() => ({
1010
from: { scale: 0, rotateZ: -360 },
1111
to: { scale: 1, rotateZ: 0 },

src/components/AnimatedPlanet/hooks/useAnimatedTrail.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect, useState } from "react";
22
import { easings, SpringRef, SpringValue, useSpring } from "react-spring";
33

4-
interface AnimatedPlaneTrailReturnType {
4+
interface AnimatedTrailReturnType {
55
props: { strokeDashoffset: SpringValue<number> };
66
api: SpringRef<{ strokeDashoffset: number }>;
77
isAnimationReady: boolean;
@@ -19,8 +19,8 @@ export const useAnimatedTrail = (
1919
pathRef: React.RefObject<SVGPathElement>,
2020
delay: number,
2121
duration: number,
22-
): AnimatedPlaneTrailReturnType => {
23-
const [trailTotalLength, setTrailTotalLength] = useState<number>(0);
22+
): AnimatedTrailReturnType => {
23+
const [trailTotalLength, setTrailTotalLength] = useState(0);
2424
const [isAnimationReady, setIsAnimationReady] = useState(false);
2525

2626
useEffect(() => {

0 commit comments

Comments
 (0)