Skip to content

Commit

Permalink
chore: code format
Browse files Browse the repository at this point in the history
  • Loading branch information
dohooo committed Nov 25, 2024
1 parent 7a329f5 commit 93fea96
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions example/app/app/demos/custom-animations/multiple/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import * as React from "react";
import { View } from "react-native";
import Carousel, { ICarouselInstance } from "react-native-reanimated-carousel";

import { CarouselAdvancedSettingsPanel } from "@/components/CarouselAdvancedSettingsPanel";
import { defaultDataWith6Colors } from "@/components/CarouselBasicSettingsPanel";
import { SBItem } from "@/components/SBItem";
import { window } from "@/constants/sizes";
import { CaptureWrapper } from "@/store/CaptureProvider";
import { CarouselAdvancedSettingsPanel } from "@/components/CarouselAdvancedSettingsPanel";
import { useAdvancedSettings } from "@/hooks/useSettings";
import { defaultDataWith6Colors } from "@/components/CarouselBasicSettingsPanel";
import { CaptureWrapper } from "@/store/CaptureProvider";

const PAGE_WIDTH = window.width;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Carousel.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import { CarouselLayout } from "./CarouselLayout";
import { useCommonVariables } from "../hooks/useCommonVariables";
import { useInitProps } from "../hooks/useInitProps";
import { usePropsErrorBoundary } from "../hooks/usePropsErrorBoundary";
import { GlobalStateProvider } from "../store";
import type { ICarouselInstance, TCarouselProps } from "../types";
import { CarouselLayout } from "./CarouselLayout";

const Carousel = React.forwardRef<ICarouselInstance, TCarouselProps<any>>((_props, ref) => {
const props = useInitProps(_props);
Expand Down
12 changes: 6 additions & 6 deletions src/components/CarouselLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from "react";
import { StyleSheet, type ViewStyle } from "react-native";
import { runOnJS, useAnimatedStyle, useDerivedValue } from "react-native-reanimated";
import { useGlobalState } from "../store";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { useLayoutConfig } from "../hooks/useLayoutConfig";
import { runOnJS, useAnimatedStyle, useDerivedValue } from "react-native-reanimated";
import { useAutoPlay } from "../hooks/useAutoPlay";
import { useCarouselController } from "../hooks/useCarouselController";
import { useCommonVariables } from "../hooks/useCommonVariables";
import { useLayoutConfig } from "../hooks/useLayoutConfig";
import { useOnProgressChange } from "../hooks/useOnProgressChange";
import { useCarouselController } from "../hooks/useCarouselController";
import { computedRealIndexWithAutoFillData } from "../utils/computed-with-auto-fill-data";
import { useGlobalState } from "../store";
import { ICarouselInstance } from "../types";
import { ScrollViewGesture } from "./ScrollViewGesture";
import { computedRealIndexWithAutoFillData } from "../utils/computed-with-auto-fill-data";
import { ItemRenderer } from "./ItemRenderer";
import { ScrollViewGesture } from "./ScrollViewGesture";

export type TAnimationStyle = (value: number) => ViewStyle;

Expand Down
8 changes: 4 additions & 4 deletions src/hooks/useCarouselController.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { useSharedValue } from "react-native-reanimated";

import { act, renderHook } from "@testing-library/react-hooks";

import { useCarouselController } from "./useCarouselController";
import { useRef, useImperativeHandle } from "react";
import { ICarouselInstance } from "../types";
import { GlobalStateContext, IContext } from "../store";
import { useImperativeHandle, useRef } from "react";
import { View } from "react-native";
import { GlobalStateContext, IContext } from "../store";
import { ICarouselInstance } from "../types";
import { useCarouselController } from "./useCarouselController";

// Mock Reanimated
jest.mock("react-native-reanimated", () => {
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useCarouselController.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { useRef } from "react";
import { runOnJS, SharedValue, useAnimatedReaction, useSharedValue } from "react-native-reanimated";
import { SharedValue, runOnJS, useAnimatedReaction, useSharedValue } from "react-native-reanimated";

import { Easing } from "../constants";
import { useGlobalState } from "../store";
import type {
ICarouselInstance,
TCarouselActionOptions,
Expand All @@ -15,7 +16,6 @@ import {
import { dealWithAnimation } from "../utils/deal-with-animation";
import { handlerOffsetDirection } from "../utils/handleroffset-direction";
import { round } from "../utils/log";
import { useGlobalState } from "../store";

interface IOpts {
ref: React.ForwardedRef<ICarouselInstance>;
Expand Down
2 changes: 1 addition & 1 deletion src/store/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

import type { TInitializeCarouselProps } from "../hooks/useInitProps";
import { SharedValue, useSharedValue } from "react-native-reanimated";
import type { TInitializeCarouselProps } from "../hooks/useInitProps";

type ItemDimensions = Record<number, { width: number; height: number }>;

Expand Down

0 comments on commit 93fea96

Please sign in to comment.