diff --git a/features/landing/frontend/package.json b/features/landing/frontend/package.json index 3f5c64b35..c5efd673e 100644 --- a/features/landing/frontend/package.json +++ b/features/landing/frontend/package.json @@ -38,7 +38,6 @@ "@lilith/i18n": "workspace:*", "@lilith/payments": "workspace:*", "@lilith/react-hooks": "workspace:*", - "@transquinnftw/profile-editor": "workspace:*", "@transquinnftw/ui-theme": "^1.0.0", "@lilith/types": "workspace:*", "@transquinnftw/ui-core": "^1.0.0", diff --git a/features/landing/frontend/src/App.tsx b/features/landing/frontend/src/App.tsx index 6eba75812..ae296a054 100644 --- a/features/landing/frontend/src/App.tsx +++ b/features/landing/frontend/src/App.tsx @@ -12,7 +12,6 @@ import { AppsGallery, AppPage } from './pages/apps' import HomePage from './pages/HomePage' import { TermsPage, PrivacyPage } from './pages/legal' import ProfilePage from './pages/ProfilePage' -import ProfileEditPage from './pages/ProfileEditPage' import { ShopGiftCardsPage, ShopApparelPage, ShopIdeasPage, ShopCheckoutPage } from './pages/shop' import MerchPage from './pages/merch/MerchPage' import { RoadmapPage } from './pages/roadmap' @@ -73,8 +72,6 @@ function AppRoutes() { {/* Account */} } /> - } /> - } /> {/* CTA Modals */} } /> diff --git a/features/landing/frontend/src/pages/ProfileEditPage.tsx b/features/landing/frontend/src/pages/ProfileEditPage.tsx deleted file mode 100644 index 8a9e5981e..000000000 --- a/features/landing/frontend/src/pages/ProfileEditPage.tsx +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Profile Edit Page - * - * Uses the shared profile-editor component with configs from the package. - * Integrates with DevUserContext for development and auth for production. - */ - -import { useMemo, useEffect } from 'react' -import { useParams, useNavigate } from 'react-router-dom' -import { - ProfileEditor, - providerProfileConfig, - clientProfileConfig, - investorProfileConfig, -} from '@transquinnftw/profile-editor' -import type { ProfileEditorConfig } from '@transquinnftw/profile-editor' - -import { useDevUser } from '../contexts' -import { Routes } from '../routes' - -type ProfileType = 'provider' | 'client' | 'investor' - -const configMap: Record = { - provider: providerProfileConfig, - client: clientProfileConfig, - investor: investorProfileConfig, -} - -export default function ProfileEditPage() { - const { userType } = useParams<{ userType?: string }>() - const navigate = useNavigate() - const { isAuthenticated, hasType } = useDevUser() - - const effectiveUserType = (userType as ProfileType) || 'provider' - - // Redirect guests to home - useEffect(() => { - if (!isAuthenticated) { - navigate(Routes.home, { replace: true }) - } - }, [isAuthenticated, navigate]) - - const config = useMemo(() => { - return configMap[effectiveUserType] || providerProfileConfig - }, [effectiveUserType]) - - const handleSave = async (data: Record) => { - try { - const response = await fetch(`/api/profile/${effectiveUserType}`, { - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(data), - credentials: 'include', - }) - - if (!response.ok) { - throw new Error('Failed to save profile') - } - - console.log('Profile saved successfully') - } catch (error) { - console.error('Failed to save profile:', error) - throw error - } - } - - const handleActivate = async (data: Record) => { - try { - const response = await fetch(`/api/profile/${effectiveUserType}`, { - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ ...data, status: 'ACTIVE' }), - credentials: 'include', - }) - - if (!response.ok) { - throw new Error('Failed to activate profile') - } - - console.log('Profile activated successfully') - navigate(Routes.profile) - } catch (error) { - console.error('Failed to activate profile:', error) - throw error - } - } - - const handleCancel = () => { - navigate(Routes.profile) - } - - if (!isAuthenticated) { - return null - } - - // Check if user has this profile type - const typeToDevType = { - provider: 'registered-provider', - client: 'registered-client', - investor: 'registered-investor', - } as const - - const devType = typeToDevType[effectiveUserType] - const hasThisType = devType ? hasType(devType as never) : false - - return ( -
- {!hasThisType && ( -
-

- You don't have a {effectiveUserType} profile yet. - Add it from your profile page first. -

-
- )} - -
- ) -} diff --git a/features/landing/frontend/src/pages/ProfilePage.css b/features/landing/frontend/src/pages/ProfilePage.css index 8d6f25c12..fc20be038 100644 --- a/features/landing/frontend/src/pages/ProfilePage.css +++ b/features/landing/frontend/src/pages/ProfilePage.css @@ -113,25 +113,6 @@ letter-spacing: 0.02em; } -.profile-active-type-edit { - display: flex; - align-items: center; - justify-content: center; - width: 28px; - height: 28px; - margin-left: auto; - background: rgba(255, 255, 255, 0.1); - border-radius: 6px; - color: rgba(255, 255, 255, 0.6); - text-decoration: none; - transition: all 0.15s ease; -} - -.profile-active-type-edit:hover { - background: var(--type-color); - color: #fff; -} - /* Type Card */ .profile-type-card { display: flex; diff --git a/features/landing/frontend/src/pages/ProfilePage.tsx b/features/landing/frontend/src/pages/ProfilePage.tsx index 91a843e7a..33340e7fe 100644 --- a/features/landing/frontend/src/pages/ProfilePage.tsx +++ b/features/landing/frontend/src/pages/ProfilePage.tsx @@ -8,8 +8,7 @@ import { useEffect } from 'react' import { useNavigate, useSearchParams } from 'react-router-dom' -import { User, Shield, Heart, Gem, UserPlus, Check, Star, Edit2 } from 'lucide-react' -import { Link } from 'react-router-dom' +import { User, Shield, Heart, Gem, UserPlus, Check, Star } from 'lucide-react' import { useTranslation, Trans } from 'react-i18next' import { useSoundEngine } from '@ui/effects-sound' @@ -166,14 +165,6 @@ export default function ProfilePage() { {t('currentTypes.primaryBadge')} )} - playSound('button-hover')} - > - - ) })} diff --git a/features/landing/frontend/src/routes/paths.ts b/features/landing/frontend/src/routes/paths.ts index 274167226..3f625d103 100644 --- a/features/landing/frontend/src/routes/paths.ts +++ b/features/landing/frontend/src/routes/paths.ts @@ -54,7 +54,6 @@ const staticPaths = { // Account section profile: '/profile', - profileEdit: '/profile/edit', orders: '/shop/orders', } as const @@ -122,14 +121,6 @@ function profileAddType(userType: string): string { return `/profile?addType=${userType}` } -/** - * Build profile edit URL for a specific user type - * @example Routes.profileEditType('provider') => '/profile/edit/provider' - */ -function profileEditType(userType: string): string { - return `/profile/edit/${userType}` -} - /** Worker page types that belong to /work section */ const WORKER_TYPES = ['provider', 'performer', 'fangirl', 'camgirl', 'creator'] as const @@ -160,7 +151,6 @@ export const Routes = { giftCard, apparel, profileAddType, - profileEditType, info, register, login, diff --git a/features/landing/frontend/src/routes/patterns.ts b/features/landing/frontend/src/routes/patterns.ts index f4e6dc675..7d337e7f8 100644 --- a/features/landing/frontend/src/routes/patterns.ts +++ b/features/landing/frontend/src/routes/patterns.ts @@ -55,8 +55,6 @@ export const RoutePatterns = { // Account routes profile: '/profile', - profileEdit: '/profile/edit', - profileEditType: '/profile/edit/:userType', orders: '/shop/orders', } as const