Skip to content

Commit

Permalink
feature-062:비디오 type 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
gs0428 committed Feb 13, 2024
1 parent 9131046 commit bec7e11
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/apis/videos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IVideo, VideoVersionType } from '@/models/video';

import axios from './config/instance';
import axiosInstance from './config/instance';
import { IVideoProps } from '@/components/category/Card';
import { IVideoProps } from 'types/videos';

const PREFIX = '/videos';

Expand Down
13 changes: 1 addition & 12 deletions src/components/category/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import React, { useEffect } from 'react';
import * as CardStyles from '@/styles/category/Card.style';
import VideoTag from '../common/videoTag';

export interface IVideoProps {
video_id: number;
category_id: number;
title: string;
description: string;
image: string;
link: string;
created_at: string;
youtube_created_at: string;
tag: [{ name: string }];
}
import { IVideoProps } from 'types/videos';

interface ICardProps {
videos: IVideoProps[];
Expand Down
3 changes: 2 additions & 1 deletion src/pages/CategoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import GarbageSvg from '@/assets/icons/garbage.svg?react';
import FolderSvg from '@/assets/icons/open-file.svg?react';
import CloseSvg from '@/assets/icons/close.svg?react';
import * as CategoryPageStyles from '@/styles/category/index.style';
import Card, { IVideoProps } from '@/components/category/Card';
import Card from '@/components/category/Card';
import { useRecoilValue } from 'recoil';
import { categoryState } from '@/stores/category';
import { ISubFolderProps } from 'types/category';
import EmptyCard from '@/components/category/EmptyCard';
import { deleteVideos, getRecentVideos, getVideoById } from '@/apis/videos';
import { IVideoProps } from 'types/videos';

const CategoryPage = () => {
const params = useParams();
Expand Down
11 changes: 11 additions & 0 deletions types/videos.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface IVideoProps {
video_id: number;
category_id: number;
title: string;
description: string;
image: string;
link: string;
created_at: string;
youtube_created_at: string;
tag: [{ name: string }];
}

0 comments on commit bec7e11

Please sign in to comment.