Skip to content

Commit

Permalink
fix: fix review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr committed Apr 4, 2024
1 parent 7dfd643 commit 05f6d77
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from "path";
import path from "path";
import { fileURLToPath } from "url";
import type { StorybookConfig } from "@storybook/react-webpack5";

Expand Down
4 changes: 2 additions & 2 deletions src/components/AnimatedPlanet/hooks/useAnimatedPlane.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { easings, SpringRef, SpringValue, useSpring } from "react-spring";

interface AnimatedPlaneTrailReturnType {
interface AnimatedPlaneReturnType {
props: { opacity: SpringValue<number>; offsetDistance: SpringValue<string> };
api: SpringRef<{ opacity: number; offsetDistance: string }>;
}

export const useAnimatedPlane = (delay: number, duration: number): AnimatedPlaneTrailReturnType => {
export const useAnimatedPlane = (delay: number, duration: number): AnimatedPlaneReturnType => {
const [props, api] = useSpring(() => ({
from: { opacity: 0, offsetDistance: "0%" },
to: { opacity: 1, offsetDistance: "100%" },
Expand Down
4 changes: 2 additions & 2 deletions src/components/AnimatedPlanet/hooks/useAnimatedStar.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { easings, SpringRef, SpringValue, useSpring } from "react-spring";

interface AnimatedPlaneTrailReturnType {
interface AnimatedStarReturnType {
props: { scale: SpringValue<number>; rotateZ: SpringValue<number> };
api: SpringRef<{ scale: number; rotateZ: number }>;
}

export const useAnimatedStar = (delay: number, duration: number): AnimatedPlaneTrailReturnType => {
export const useAnimatedStar = (delay: number, duration: number): AnimatedStarReturnType => {
const [props, api] = useSpring(() => ({
from: { scale: 0, rotateZ: -360 },
to: { scale: 1, rotateZ: 0 },
Expand Down
6 changes: 3 additions & 3 deletions src/components/AnimatedPlanet/hooks/useAnimatedTrail.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react";
import { easings, SpringRef, SpringValue, useSpring } from "react-spring";

interface AnimatedPlaneTrailReturnType {
interface AnimatedTrailReturnType {
props: { strokeDashoffset: SpringValue<number> };
api: SpringRef<{ strokeDashoffset: number }>;
isAnimationReady: boolean;
Expand All @@ -19,8 +19,8 @@ export const useAnimatedTrail = (
pathRef: React.RefObject<SVGPathElement>,
delay: number,
duration: number,
): AnimatedPlaneTrailReturnType => {
const [trailTotalLength, setTrailTotalLength] = useState<number>(0);
): AnimatedTrailReturnType => {
const [trailTotalLength, setTrailTotalLength] = useState(0);
const [isAnimationReady, setIsAnimationReady] = useState(false);

useEffect(() => {
Expand Down

0 comments on commit 05f6d77

Please sign in to comment.