teamid 콘텐츠 스타일 조정#90
Conversation
Summary of ChangesHello @Jieunsse, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자 인터페이스의 시각적 피드백과 레이아웃 일관성을 향상시키는 데 중점을 둡니다. 칸반 태스크 업데이트 시 로딩 상태를 명확히 표시하여 사용자에게 진행 상황을 알리고, 사이드바 및 내비게이션 바에 로그아웃 기능을 통합하여 접근성을 높였습니다. 또한, 특정 페이지의 CSS 스타일을 조정하여 전반적인 레이아웃 정렬을 개선했습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| const handleLogout = async () => { | ||
| await fetch('/api/auth/logout', { method: 'POST' }); | ||
| router.push('/login'); | ||
| }; |
There was a problem hiding this comment.
로그아웃 로직이 TeamNavClient.tsx, AddTeamSidebarWrapper.tsx 등 여러 컴포넌트에 중복되어 있습니다. 코드 재사용성을 높이고 유지보수를 용이하게 하기 위해 이 로직을 커스텀 훅(예: useAuth)으로 추출하는 것을 권장합니다.
예시:
// src/hooks/useAuth.ts
import { useRouter } from 'next/navigation';
export function useAuth() {
const router = useRouter();
const logout = async () => {
await fetch('/api/auth/logout', { method: 'POST' });
router.push('/login');
};
return { logout };
}이후 각 컴포넌트에서는 const { logout } = useAuth(); 와 같이 훅을 호출하고 onLogout={logout}으로 전달하여 사용할 수 있습니다.
| const handleLogout = async () => { | ||
| await fetch('/api/auth/logout', { method: 'POST' }); | ||
| router.push('/login'); | ||
| }; |
| // 2초 이상 응답이 없을 때만 pending 표시 (빠른 응답 시 깜빡임 방지) | ||
| const pendingTimer = window.setTimeout(() => { | ||
| setTasks((prev) => | ||
| prev.map((task) => (task.id === taskId ? { ...task, pending: true } : task)), | ||
| ); | ||
| }, 2000); |
There was a problem hiding this comment.
하드코딩된 숫자 2000은 '매직 넘버'로, 코드의 가독성과 유지보수성을 저해할 수 있습니다. PENDING_UI_DELAY_MS와 같이 의미를 명확히 나타내는 상수로 정의하여 사용하는 것이 좋습니다. 이 상수는 훅의 최상단에 선언하는 것이 이상적이지만, 우선 아래와 같이 수정하여 가독성을 높일 수 있습니다.
| // 2초 이상 응답이 없을 때만 pending 표시 (빠른 응답 시 깜빡임 방지) | |
| const pendingTimer = window.setTimeout(() => { | |
| setTasks((prev) => | |
| prev.map((task) => (task.id === taskId ? { ...task, pending: true } : task)), | |
| ); | |
| }, 2000); | |
| // 2초 이상 응답이 없을 때만 pending 표시 (빠른 응답 시 깜빡임 방지) | |
| const PENDING_UI_DELAY_MS = 2000; | |
| const pendingTimer = window.setTimeout(() => { | |
| setTasks((prev) => | |
| prev.map((task) => (task.id === taskId ? { ...task, pending: true } : task)), | |
| ); | |
| }, PENDING_UI_DELAY_MS); |
| const handleLogout = async () => { | ||
| await fetch('/api/auth/logout', { method: 'POST' }); | ||
| router.push('/login'); | ||
| }; |
Summary
Issue
Scope
포함
특이사항