- {/* Dropzone */}
-
-
-
- {isDragActive ? (
-
{t('photos.dropHere')}
- ) : (
- <>
-
{t('photos.dropHereActive')}
-
{t('photos.clickToSelect')}
-
{t('photos.fileTypeHint')}
- >
- )}
-
-
- {/* Preview grid */}
- {files.length > 0 && (
-
-
{files.length} {t(files.length !== 1 ? 'photos.photosSelected' : 'photos.photoSelected')}
-
- {files.map((file, idx) => (
-
-

-
-
- {formatSize(file.size)}
-
-
- ))}
-
-
- )}
-
- {/* Options */}
- {files.length > 0 && (
-
-
-
-
-
-
-
-
-
-
-
- setCaption(e.target.value)}
- placeholder={t('photos.captionPlaceholder')}
- className="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900"
- />
-
-
- )}
-
- {/* Upload progress */}
- {uploading && (
-
-
-
-
{t('common.uploading')}
-
-
-
- )}
-
- {/* Actions */}
-
-
-
-
-
- )
-}
diff --git a/client/src/pages/PhotosPage.test.tsx b/client/src/pages/PhotosPage.test.tsx
deleted file mode 100644
index 0274c452..00000000
--- a/client/src/pages/PhotosPage.test.tsx
+++ /dev/null
@@ -1,230 +0,0 @@
-import React from 'react';
-import { describe, it, expect, beforeEach, vi } from 'vitest';
-import { render, screen, waitFor, act } from '../../tests/helpers/render';
-import { Route, Routes } from 'react-router-dom';
-import { http, HttpResponse } from 'msw';
-import { server } from '../../tests/helpers/msw/server';
-import { resetAllStores, seedStore } from '../../tests/helpers/store';
-import { buildUser, buildTrip } from '../../tests/helpers/factories';
-import { useAuthStore } from '../store/authStore';
-import { useTripStore } from '../store/tripStore';
-import PhotosPage from './PhotosPage';
-import type { Photo } from '../types';
-
-vi.mock('../components/Photos/PhotoGallery', () => ({
- default: ({ photos }: { photos: Photo[]; onUpload: unknown; onDelete: unknown; onUpdate: unknown; places: unknown[]; days: unknown[]; tripId: unknown }) =>
- React.createElement('div', { 'data-testid': 'photo-gallery' }, `${photos.length} photos`),
-}));
-
-vi.mock('../components/Layout/Navbar', () => ({
- default: ({ tripTitle }: { tripTitle?: string }) =>
- React.createElement('nav', { 'data-testid': 'navbar' }, tripTitle),
-}));
-
-function buildPhoto(overrides: Partial