Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 멤버 검색 이후 프로필로 들어가지지 않는 오류 수정 #1623

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/components/members/main/MemberList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { css } from '@emotion/react';
import styled from '@emotion/styled';
import { colors } from '@sopt-makers/colors';
import { IconChevronDown, IconSwitchVertical } from '@sopt-makers/icons';
import { uniq } from 'lodash-es';
import { SearchField } from '@sopt-makers/ui';
import { debounce, uniq } from 'lodash-es';
import Link from 'next/link';
import { useRouter } from 'next/router';
import React, { ChangeEvent, FC, ReactNode, useEffect, useMemo, useState } from 'react';
Expand Down Expand Up @@ -38,7 +39,6 @@ import { useRunOnce } from '@/hooks/useRunOnce';
import IconDiagonalArrow from '@/public/icons/icon-diagonal-arrow.svg';
import { MOBILE_MEDIA_QUERY } from '@/styles/mediaQuery';
import { textStyles } from '@/styles/typography';
import { SearchField } from '@sopt-makers/ui';

const PAGE_LIMIT = 30;

Expand Down Expand Up @@ -179,10 +179,14 @@ const MemberList: FC<MemberListProps> = ({ banner }) => {
logClickEvent('filterOrderBy', { orderBy });
});

const handleSearchSubmit = (searchQuery: string) => {
const handleSearchSubmit = debounce((searchQuery: string) => {
addQueryParamsToUrl({ search: searchQuery });
logSubmitEvent('searchMember', { content: 'searchQuery' });
};
logSubmitEvent('searchMember', { content: searchQuery });

if (document.activeElement instanceof HTMLElement) {
document.activeElement.blur();
}
}, 0);
Comment on lines +186 to +189
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document.activeElement 배워갑니다! 이부분은 확실히 mds에 요청해야할거같아요!


const handleClickCard = (profile: Profile) => {
logClickEvent('memberCard', { id: profile.id, name: profile.name });
Expand Down
Loading