Skip to content

Commit

Permalink
chore: Type지정
Browse files Browse the repository at this point in the history
  • Loading branch information
WithJo committed Aug 28, 2024
1 parent cd34f0d commit cb6df9d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 10 additions & 2 deletions src/constants/Question.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
export const questions = [
import React from "react";

interface Question {
text: string;
imageUrl: string;
option: React.ReactNode[];
}

export const questions: Question[] = [
{},

Check failure on line 10 in src/constants/Question.tsx

View workflow job for this annotation

GitHub Actions / e2e

Type '{}' is missing the following properties from type 'Question': text, imageUrl, option
{
text: "공놀이 좋아해?",
imageUrl: "https://cdn.pixabay.com/photo/2015/01/26/22/40/child-613199_640.jpg",
imageUrl: "https://cdn.pixabay.com/photo/2015/01/-613199_640.jpg",
option: ["역시 체육은 공놀이지", "응 아니야"],
},
{
Expand Down
8 changes: 4 additions & 4 deletions src/pages/SelectPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRef, useState } from "react";
import { useNavigate } from "react-router-dom";

Check failure on line 2 in src/pages/SelectPage.tsx

View workflow job for this annotation

GitHub Actions / e2e

'useNavigate' is declared but its value is never read.

import { motion } from "framer-motion";
import { PanInfo } from "framer-motion";

import { Text } from "@/components/typography/Text";

Expand Down Expand Up @@ -33,17 +33,17 @@ export default function SelectPage() {
const constraintsRef = useRef(null);
const initialX = useRef(0);
const [isModalOpen, setIsModalOpen] = useState(true);
let navigate = useNavigate();
// let navigate = useNavigate(); 추후에 사용할 예정

const handleCloseModal = () => {
setIsModalOpen(false);
};

const handleDragStart = (event, info) => {
const handleDragStart = (event: Event, info: PanInfo) => {

Check failure on line 42 in src/pages/SelectPage.tsx

View workflow job for this annotation

GitHub Actions / e2e

'event' is declared but its value is never read.
initialX.current = info.point.x;
};

const handleDragEnd = (event, info) => {
const handleDragEnd = (event: Event, info: PanInfo) => {

Check failure on line 46 in src/pages/SelectPage.tsx

View workflow job for this annotation

GitHub Actions / e2e

'event' is declared but its value is never read.
const deltaX = info.point.x - initialX.current;
if (deltaX >= 60) {
setAnimateLeftToRight(true);
Expand Down

0 comments on commit cb6df9d

Please sign in to comment.