Skip to content

Commit

Permalink
refactor: (#839) 변수명, 함수명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilpop8663 committed Nov 14, 2023
1 parent e1a917d commit 867f2f0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/common/Select/Select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const SelectExample = () => {
);
};

export const Disable = () => {
export const Disabled = () => {
const { handleOptionChange, isSelectOpen, selectedOption, toggleSelect } =
useSelect<SortingOptionType>('popular');

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/common/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function Select<T extends string>({
}: SelectProps<T>) {
const optionKeyList = Object.keys(optionList) as T[];

const toggleOpen = () => {
const handleToggleOpen = () => {
if (isDisabled) return;
toggleSelect();
};
Expand All @@ -46,7 +46,7 @@ export default function Select<T extends string>({

return (
<S.Container>
<S.SelectedContainer onClick={toggleOpen} $status={getSelectStatus()} {...rest}>
<S.SelectedContainer onClick={handleToggleOpen} $status={getSelectStatus()} {...rest}>
<span>{selectedOption}</span>
<S.Image src={isOpen ? chevronUp : chevronDown} alt="" $isSelected={isOpen} />
</S.SelectedContainer>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/post/PostList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function PostList() {
handleCloseClick: handleSortingClose,
} = useSelect<PostSorting>(postOption.sorting);

const focusTopContent = () => {
const handleFocusTopContent = () => {
if (!topButtonRef.current) return;

topButtonRef.current.focus();
Expand Down Expand Up @@ -100,7 +100,7 @@ export default function PostList() {
</S.SkeletonWrapper>
}
>
<PostListFetcher focusTopContent={focusTopContent} />
<PostListFetcher handleFocusTopContent={handleFocusTopContent} />
</Suspense>
</ErrorBoundary>
<S.HiddenLink aria-label="게시글 작성 페이지로 이동" to={PATH.POST_WRITE} />
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/post/PostListFetcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import Post from '../Post';
import * as S from './style';

interface PostListFetcherProps {
focusTopContent: () => void;
handleFocusTopContent: () => void;
}

export default function PostListFetcher({ focusTopContent }: PostListFetcherProps) {
export default function PostListFetcher({ handleFocusTopContent }: PostListFetcherProps) {
const { postOption } = useContext(PostOptionContext);
const { postType, postOptionalOption } = usePostRequestInfo();
const { loggedInfo } = useContext(AuthContext);
Expand Down Expand Up @@ -62,7 +62,7 @@ export default function PostListFetcher({ focusTopContent }: PostListFetcherProp
return <Post key={post.postId} isPreview={true} postInfo={post} />;
})}
<li key={`${pageIndex}UserButton`}>
<S.HiddenButton onClick={focusTopContent} aria-label="스크롤 맨 위로가기" />
<S.HiddenButton onClick={handleFocusTopContent} aria-label="스크롤 맨 위로가기" />
<S.HiddenLink aria-label="게시글 작성 페이지로 이동" to={PATH.POST_WRITE} />
</li>
</React.Fragment>
Expand Down

0 comments on commit 867f2f0

Please sign in to comment.