Skip to content

Commit

Permalink
feat: 공용 타입 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
BangDori committed May 2, 2024
1 parent 5f95126 commit 6a3b79b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 41 deletions.
5 changes: 2 additions & 3 deletions src/widgets/feed-main-list/api/useInfinityFeeds.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { useInfiniteQuery } from '@tanstack/react-query';

import { axiosInstance } from '@/shared/axios';
import { QUERY_KEYS } from '@/shared/consts';
import { FeedList } from '@/widgets/feed/consts/type';
import { Feed, QUERY_KEYS } from '@/shared/consts';

interface FetchFeeds {
code: string;
data: {
currentPageNumber: number;
feeds: FeedList;
feeds: Feed[];
hasNext: boolean;
numberOfElements: number;
pageSize: number;
Expand Down
36 changes: 0 additions & 36 deletions src/widgets/feed/consts/type.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/widgets/feed/ui/Feed.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Feed as FeedProps } from '@/shared/consts';
import { Icon, Profile } from '@/shared/ui';
import { calculateElapsedTime } from '@/shared/utils';

import './Feed.scss';
import { FeedProps } from '../consts/type';

export const Feed: React.FC<FeedProps> = ({ feed }) => {
export const Feed: React.FC<{ feed: FeedProps }> = ({ feed }) => {
const { user, content, likeCount, commentCount, updatedAt } = feed;

return (
Expand Down

0 comments on commit 6a3b79b

Please sign in to comment.