Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c9d8ee8
Feat: 배포 브랜치 변경에의한 배포 자동화
paul-lee-dev Nov 10, 2025
a2f864e
refactor: 인증 타입 카드 컴포넌트 주석 제거
yeni0727 Nov 10, 2025
8669edb
뱃지 페이지 뒤로가기 -1로 수정
ipcarepi Nov 10, 2025
05f5312
뱃지 페이지 위 글자 가운데 정렬
ipcarepi Nov 10, 2025
cf2f92c
refactor: 모달 컴포넌트의 성공 타입 처리 개선 및 UI 수정
yeni0727 Nov 10, 2025
238019c
Refactor: admin page refactored
paul-lee-dev Nov 10, 2025
ea16c2f
Feat: Message Modal 추가 관리자 페이지 완
paul-lee-dev Nov 10, 2025
ccd6996
Merge pull request #183 from ucamp-greenmap/fix/ch
ipcarepi Nov 10, 2025
5c6c1bf
Merge pull request #184 from ucamp-greenmap/fix/badgeUI
paul-lee-dev Nov 10, 2025
1e90b65
feat: 필터바에서 로그인 상태에 따라 필터 표시 개선 및 모달 컴포넌트 추가
yeni0727 Nov 10, 2025
92d316b
Merge pull request #185 from ucamp-greenmap/feat/location
yeni0727 Nov 10, 2025
73b8daa
Merge pull request #186 from ucamp-greenmap/fix/ch
paul-lee-dev Nov 10, 2025
226f4b0
포인트 기록에서 0점도 적립 내역으로 처리
ipcarepi Nov 10, 2025
f5bab53
Merge pull request #187 from ucamp-greenmap/fix/point0
yeni0727 Nov 10, 2025
9ca914c
Refactor: : 자신 순위 강조 표시
yeni0727 Nov 10, 2025
2d1c23f
fix: 계좌번호 및 예금주명 입력 유효성 검사 추가
yeni0727 Nov 10, 2025
0c91b0f
Merge pull request #188 from ucamp-greenmap/fix/ch
ipcarepi Nov 10, 2025
ef4ac33
fix: 로그아웃 상태에서 빠른실행 내프로필->로그인창
yeni0727 Nov 10, 2025
ec20002
Merge pull request #189 from ucamp-greenmap/fix/ch
ipcarepi Nov 10, 2025
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
7 changes: 3 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ name: Deploy to Netlify
on:
push:
branches:
- main
- feat/kakao-map
- release
pull_request:
branches:
- main
- release

jobs:
build-and-deploy:
Expand Down Expand Up @@ -35,7 +34,7 @@ jobs:
uses: nwtgck/[email protected]
with:
publish-dir: './dist'
production-branch: main
production-branch: release
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
enable-pull-request-comment: true
Expand Down
524 changes: 275 additions & 249 deletions src/components/badge/BadgeForm.jsx

Large diffs are not rendered by default.

35 changes: 14 additions & 21 deletions src/components/cert/CertModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
verifyHCar,
verifyShop,
} from '../../util/certApi';

function Modal({ message, type = 'info', onClose, onSuccess }) {
const handleClick = () => {
onClose();
Expand All @@ -27,15 +28,17 @@ function Modal({ message, type = 'info', onClose, onSuccess }) {
}
};

const isSuccess = type === 'success' || type === 'info-success';

return (
<div className='fixed inset-0 flex items-center justify-center bg-black/40 z-[1000]'>
<div className='bg-white rounded-2xl shadow-xl w-80 p-6 text-center'>
<div
className={`text-4xl mb-3 ${
type === 'success' ? 'text-green-500' : 'text-red-500'
isSuccess ? 'text-green-500' : 'text-red-500'
}`}
>
{type === 'success' ? '🌳' : '🍂'}
{isSuccess ? '🌳' : '🍂'}
</div>

<p className='text-gray-800 font-semibold mb-4 mt-4 whitespace-pre-line'>
Expand All @@ -46,8 +49,7 @@ function Modal({ message, type = 'info', onClose, onSuccess }) {
onClick={handleClick}
className='w-full py-2 rounded-xl font-bold text-white'
style={{
background:
type === 'success' ? '#96cb6f' : '#e63e3eff',
background: isSuccess ? '#96cb6f' : '#e63e3eff',
}}
>
확인
Expand All @@ -66,16 +68,13 @@ export default function CertModal({
const dispatch = useDispatch();
const { isLoggedIn } = useSelector((state) => state.user);

// 모달이 열릴 때 토큰이 있으면 로그인 상태 확인
useEffect(() => {
const token = localStorage.getItem('token');
if (token && !isLoggedIn) {
// 토큰이 있지만 Redux 상태가 업데이트되지 않은 경우
api.get('/member/me', {
headers: { Authorization: `Bearer ${token}` },
})
.then((res) => {
// Redux 상태 업데이트
dispatch(login({ token }));
dispatch(
updateProfile({
Expand All @@ -86,11 +85,9 @@ export default function CertModal({
memberId: res.data.data.memberId,
})
);
// 포인트 정보 가져오기
dispatch(fetchPointInfo());
})
.catch(() => {
// 토큰이 유효하지 않으면 제거
localStorage.removeItem('token');
localStorage.removeItem('memberId');
});
Expand Down Expand Up @@ -191,10 +188,10 @@ export default function CertModal({

if (hasRecycleKeyword) {
setDetectedCategory('recycle');
showModal('재활용센터로 인식되었습니다', 'info');
showModal('재활용센터로 인식되었습니다', 'info-success');
} else if (hasZeroKeyword) {
setDetectedCategory('zero');
showModal('제로웨이스트로 인식되었습니다', 'info');
showModal('제로웨이스트로 인식되었습니다', 'info-success');
} else {
showModal(
'키워드를 인식하지 못했습니다. 영수증을 다시 확인해주세요.',
Expand All @@ -209,7 +206,7 @@ export default function CertModal({
if (hasKeyword) {
showModal(
'인식 완료! 값을 확인 후 인증 요청을 눌러주세요',
'info'
'info-success'
);
} else {
showModal(
Expand Down Expand Up @@ -241,9 +238,7 @@ export default function CertModal({
if (file) processImageWithOCR(file);
}

// 버튼 비활성화 조건 계산
const isButtonDisabled = () => {
// type이 없으면 비활성화
if (!type || !type.id) {
return true;
}
Expand Down Expand Up @@ -368,7 +363,6 @@ export default function CertModal({
const successMessage = `인증 성공! ${result.message}\n\n획득 포인트: ${result.data.point}P\n탄소 감소량: ${carbonAmount}kg`;

showModal(successMessage, 'success');
// onClose();
} else {
let userMessage = result.message || '인증에 실패했습니다.';
if (
Expand All @@ -392,12 +386,12 @@ export default function CertModal({
};

return (
<div className='fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center z-50 p-4 pt-8 overflow-y-auto'>
<div className='fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4 overflow-y-auto'>
<div
className='rounded-2xl max-w-md w-full my-4 flex flex-col shadow-2xl overflow-hidden bg-clip-padding'
className='rounded-2xl max-w-md w-full my-8 flex flex-col shadow-2xl overflow-hidden bg-clip-padding'
style={{
backgroundColor: 'transparent',
maxHeight: 'calc(100vh - 64px)',
maxHeight: '85vh',
}}
>
{/* 상단 헤더 */}
Expand All @@ -421,12 +415,11 @@ export default function CertModal({
</div>

{/* 내부 내용 */}
<div className='bg-white flex flex-col flex-1'>
<div className='bg-white flex flex-col flex-1 overflow-hidden'>
<div
className='overflow-y-auto p-6 space-y-4'
className='overflow-y-auto p-6 space-y-4 flex-1'
style={{
overscrollBehavior: 'contain',
maxHeight: 'calc(100vh - 400px)',
}}
>
{/* 파일 업로드 */}
Expand Down
1 change: 0 additions & 1 deletion src/components/cert/CertTypeCard.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { ChevronRight } from 'lucide-react';

// 인증 타입 카드 컴포넌트
export default function CertTypeCard({ type, onClick }) {
return (
<button
Expand Down
Loading