Skip to content

Commit

Permalink
🎨 UserContentBlock 내부 href프롭스 및 useNavigate로직 삭제
Browse files Browse the repository at this point in the history
- 외부에서 onClick으로 주입가능
  • Loading branch information
loevray committed Jan 2, 2024
1 parent dde1bfc commit e410c29
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/components/common/UserContentBlock/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Text,
VStack,
} from '@chakra-ui/react';
import { useNavigate } from 'react-router-dom';

interface UserContentBlockProps extends FlexProps {
href?: string;
Expand All @@ -23,7 +22,6 @@ interface UserContentBlockProps extends FlexProps {
}

const UserContentBlock = ({
href,
userImage = '',
userImageSize = '50px',
username = '테스트용',
Expand All @@ -35,14 +33,11 @@ const UserContentBlock = ({
onSubContentClick,
...props
}: UserContentBlockProps) => {
const navigate = useNavigate();
const onNavigate = () => navigate(`${href}`);
return (
<Flex
w={DEFAULT_WIDTH}
align="center"
gap="17px"
onClick={() => href && onNavigate()}
cursor="pointer"
pl={DEFAULT_PAGE_PADDING}
pr={DEFAULT_PAGE_PADDING}
Expand Down

0 comments on commit e410c29

Please sign in to comment.