Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluesmile82 committed Nov 15, 2024
1 parent 3ea41f9 commit 1f9d0eb
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/components/arrows/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import ArrowRight from "@/svgs/arrow-right.svg";
const Arrows = ({
changeTextIndex,
textIndex,
isMaxIndex,
isMaxIndex = false,
}: {
changeTextIndex: (index: number) => void;
textIndex: number;
isMaxIndex: boolean;
isMaxIndex?: boolean;
}) => (
<div className="mt-1 flex items-start gap-0.5">
<button
Expand Down
3 changes: 2 additions & 1 deletion src/components/button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";
import * as React from "react";

import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import { motion, MotionProps } from "framer-motion";
Expand Down Expand Up @@ -55,7 +56,7 @@ Button.displayName = "Button";
type MotionButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & ButtonProps & MotionProps;

const MotionButton = React.forwardRef<HTMLButtonElement, MotionButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
({ className, variant, size, ...props }, ref) => {
return (
<motion.button
className={cn(buttonVariants({ variant, size, className }))}
Expand Down
4 changes: 2 additions & 2 deletions src/components/globe-map/controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ export const Controls = ({
setEnabled(true);
});
}
}),
[isInView];
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isInView]);

return (
<CameraControls
Expand Down
9 changes: 4 additions & 5 deletions src/components/globe-map/globe-group.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useMemo } from "react";
import { Globe } from "./globe";
import Marker from "./marker";
import { useFrame } from "@react-three/fiber";
import type { markers as MarkerType } from "./data";
import { Group } from "three";

import type { markers as MarkerType } from "./data";
import { Globe } from "./globe";
import Marker from "./marker";

const GlobeGroup = ({
hasMarkers,
markers,
Expand Down Expand Up @@ -38,7 +38,6 @@ const GlobeGroup = ({
<Marker
key={`globe-marker-${index}`}
index={markers.indexOf(marker)}
id={marker.id}
isSelected={selectedMarker === markers.indexOf(marker)}
setSelectedMarker={setSelectedMarker}
lat={marker.lat}
Expand Down
8 changes: 5 additions & 3 deletions src/components/globe-map/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
"use client";
import { useState, useRef, useEffect, CSSProperties, useCallback, use } from "react";
import { useState, useRef, useEffect, CSSProperties, useCallback } from "react";

import { Canvas } from "@react-three/fiber";
import { useGesture } from "@use-gesture/react";
import { Group } from "three";
import { useErrorBoundary } from "use-error-boundary";

import { Controls } from "./controls";
import { markers } from "./data";
import GlobeGroup from "./globe-group";
import { useGesture } from "@use-gesture/react";
import { useErrorBoundary } from "use-error-boundary";

export default function GlobeMap({
videoMaterial,
Expand Down
11 changes: 6 additions & 5 deletions src/components/globe-map/marker.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Group, Vector3 } from "three";
import { useState, useRef } from "react";
import { useFrame } from "@react-three/fiber";

import { Html } from "@react-three/drei";
import { convertLatLonToVec3 } from "@/lib/globe-utils";
import { useFrame } from "@react-three/fiber";
import { motion } from "framer-motion";
import { Group, Vector3 } from "three";

import { convertLatLonToVec3 } from "@/lib/globe-utils";

import Popup from "./popup";

function Marker({
id,
index,
lat,
lng,
Expand All @@ -17,7 +19,6 @@ function Marker({
isSelected,
...props
}: {
id: string;
index: number;
lat: number;
lng: number;
Expand Down
15 changes: 10 additions & 5 deletions src/components/image-slider-with-text/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { useRef, useEffect, useState, ReactElement } from "react";
import { cn } from "@/lib/utils";
import { useContainerWidthWithResize, useIsMobile } from "@/lib/hooks";
import { Resizable } from "re-resizable";
import { useRef, useState } from "react";

import Image from "next/image";

import { Resizable } from "re-resizable";

import { useContainerWidthWithResize, useIsMobile } from "@/lib/hooks";
import { cn } from "@/lib/utils";

import { Button } from "@/components/button";
import CaretRight from "@/svgs/caret-right.svg";
import VideoPlayer from "@/components/video-player";

import CaretRight from "@/svgs/caret-right.svg";

const ImageSliderWithText = ({
text1,
text2,
Expand Down

0 comments on commit 1f9d0eb

Please sign in to comment.