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

[FE] 맥북에서 키워드 마지막 글자 입력되는 오류 해결(#774) #776

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 7 additions & 3 deletions frontend/src/components/common/keyword/Keyword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ const Keyword = ({ currentKeywords, onKeywordsChange, error }: KeywordProps) =>
const trimmedKeyword = keyword.trim();

if (trimmedKeyword === "") return;
if (currentKeywords.includes(trimmedKeyword)) {

if (trimmedKeyword.includes("⠀") || currentKeywords.includes(trimmedKeyword)) {
setKeyword("");
return;
}
onKeywordsChange([...currentKeywords, trimmedKeyword]);
setKeyword("");

if (e.nativeEvent.isComposing === false) {
onKeywordsChange([...currentKeywords, trimmedKeyword]);
setKeyword("");
}
}
};

Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/callback/CallbackPage.style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled, { keyframes } from "styled-components";
import { Z_INDEX } from "@/styles/zIndex";

export const CallbackPageContainer = styled.div`
display: flex;
Expand Down Expand Up @@ -41,6 +42,7 @@ export const LoadingContainer = styled.div`
border-radius: 25px;

p {
z-index: ${Z_INDEX.header};
font: ${({ theme }) => theme.TEXT.medium_bold};
color: ${({ theme }) => theme.COLOR.grey4};
}
Expand Down
Loading