Skip to content
Open
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
30 changes: 18 additions & 12 deletions src/components/keyword/KeywordPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const KeywordPopup = () => {
키워드 알림 설정
</button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogContent aria-hidden={!isOpen}>
<AlertDialogHeader>
<AlertDialogTitle>키워드 알림 설정</AlertDialogTitle>
<AlertDialogDescription>
Expand All @@ -144,17 +144,23 @@ const KeywordPopup = () => {
</AlertDialogHeader>

<div className="flex gap-2 mb-4">
<Input
value={newKeyword}
onChange={(e) => setNewKeyword(e.target.value)}
placeholder="키워드 입력"
onKeyPress={(e) => {
if (e.key === 'Enter' && newKeyword.trim() && newCategory) {
e.preventDefault();
handleAddKeyword();
}
}}
/>
<Input
value={newKeyword}
onChange={(e) => setNewKeyword(e.target.value)}
placeholder="키워드 입력"
onBlur={(e) => {
setTimeout(() => {
setNewKeyword(e.target.value)
}, 100)
}}
onKeyDown={(e) => {
if (e.isComposing) return // 한글 입력 중인 경우 무시
if (e.key === 'Enter' && newKeyword.trim() && newCategory) {
e.preventDefault()
handleAddKeyword()
}
}}
/>
<Select
value={newCategory}
onValueChange={setNewCategory}
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import React, { useEffect, useState, useCallback } from "react";
import { Link, useLocation, useNavigate } from "react-router-dom";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Button } from "@/components/ui/button";
Expand Down Expand Up @@ -50,7 +50,7 @@ export default function Frame() {
const [eventSource, setEventSource] = useState(null);
const [showLoginDialog, setShowLoginDialog] = useState(false);
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);

useEffect(() => {
if (user?.id) {
const sse = new EventSource(
Expand Down