Skip to content

Commit

Permalink
refactor: any 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
hae-on committed Jun 9, 2024
1 parent f2beade commit bb05566
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Common/TabMenu/TabMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import { forwardRef } from 'react';

import { container, menuName, tabMenu } from './tabMenu.css';

import type { Tab } from '@/types/common';
import type { Tab, TabVariant } from '@/types/common';

interface TabMenuProps {
tabMenus: Tab[];
selectedTabMenu: string;
handleTabMenuSelect: (selectedMenu: any) => void;
tabMenus: Tab<TabVariant>[];
selectedTabMenu: TabVariant;
handleTabMenuSelect: (selectedMenu: TabVariant) => void;
}

const TabMenu = (
{ tabMenus, selectedTabMenu, handleTabMenuSelect }: TabMenuProps,
ref: ForwardedRef<HTMLUListElement>
) => {
const handleTabMenuClick: MouseEventHandler<HTMLButtonElement> = (event) => {
handleTabMenuSelect(event.currentTarget.value);
handleTabMenuSelect(event.currentTarget.value as TabVariant);
};

return (
Expand Down
1 change: 1 addition & 0 deletions src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { PATH } from '@/constants/path';

export type CategoryVariant = 'food' | 'store';
export type MemberPostVariant = 'recipe' | 'review';
export type TabVariant = CategoryVariant | MemberPostVariant;

export type Food = (typeof CATEGORY_TYPE)['FOOD'];
export type Store = (typeof CATEGORY_TYPE)['STORE'];
Expand Down

0 comments on commit bb05566

Please sign in to comment.