feat: Add CI/CD pipeline and code quality improvements
- Add GitHub Actions workflow for automated CI/CD - Configure Node.js 18.x and 20.x matrix testing - Add TypeScript type checking step - Add ESLint code quality checks with enhanced rules - Add Prettier formatting verification - Add production build validation - Upload build artifacts for deployment - Set up automated testing on push/PR - Replace console.log with environment-aware logger - Add pre-commit hooks for code quality - Exclude archive folder from linting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import { useAuth } from '@/contexts/auth';
|
||||
import useNotifications from '@/hooks/useNotifications';
|
||||
import { useEffect } from "react";
|
||||
import { logger } from "@/utils/logger";
|
||||
import { useAuth } from "@/contexts/auth";
|
||||
import useNotifications from "@/hooks/useNotifications";
|
||||
|
||||
/**
|
||||
* 앱 초기화 후 환영 메시지 알림을 표시하는 커스텀 훅
|
||||
@@ -13,23 +13,25 @@ export const useWelcomeNotification = (isInitialized: boolean) => {
|
||||
useEffect(() => {
|
||||
try {
|
||||
// 환영 메시지가 이미 표시되었는지 확인하는 키
|
||||
const welcomeNotificationSent = sessionStorage.getItem('welcomeNotificationSent');
|
||||
|
||||
const welcomeNotificationSent = sessionStorage.getItem(
|
||||
"welcomeNotificationSent"
|
||||
);
|
||||
|
||||
if (isInitialized && user && !welcomeNotificationSent) {
|
||||
// 사용자 로그인 시 알림 예시 (한 번만 실행)
|
||||
const timeoutId = setTimeout(() => {
|
||||
addNotification(
|
||||
'환영합니다!',
|
||||
'젤리의 적자탈출에 오신 것을 환영합니다. 예산을 설정하고 지출을 기록해보세요.'
|
||||
"환영합니다!",
|
||||
"젤리의 적자탈출에 오신 것을 환영합니다. 예산을 설정하고 지출을 기록해보세요."
|
||||
);
|
||||
// 세션 스토리지에 환영 메시지 표시 여부 저장
|
||||
sessionStorage.setItem('welcomeNotificationSent', 'true');
|
||||
sessionStorage.setItem("welcomeNotificationSent", "true");
|
||||
}, 2000);
|
||||
|
||||
|
||||
return () => clearTimeout(timeoutId);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('환영 메시지 알림 표시 중 오류:', error);
|
||||
logger.error("환영 메시지 알림 표시 중 오류:", error);
|
||||
}
|
||||
}, [isInitialized, user, addNotification]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user