diff --git a/src/App.tsx b/src/App.tsx index 6007e6a..523d108 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1190,6 +1190,10 @@ export default function App() { setShowProfileDrawer(false); switchTab('storefront'); }} + onViewSubscriptions={() => { + setShowProfileDrawer(false); + switchTab('subscriptions'); + }} curriculumModules={curriculumModules} onDownloadInvoice={handleDownloadCheckoutInvoice} /> diff --git a/src/components/auth/ProfileDrawer.tsx b/src/components/auth/ProfileDrawer.tsx index 3937cfb..f852025 100644 --- a/src/components/auth/ProfileDrawer.tsx +++ b/src/components/auth/ProfileDrawer.tsx @@ -36,6 +36,7 @@ interface ProfileDrawerProps { onChangePassword: (e: React.FormEvent) => Promise; onLogout: () => void; onBrowseStorefront: () => void; + onViewSubscriptions?: () => void; curriculumModules: ModuleItem[]; onDownloadInvoice?: (paymentId: string, directUrl?: string) => void; } @@ -69,6 +70,7 @@ export const ProfileDrawer: React.FC = ({ onChangePassword, onLogout, onBrowseStorefront, + onViewSubscriptions, curriculumModules, onDownloadInvoice, }) => { @@ -314,9 +316,20 @@ export const ProfileDrawer: React.FC = ({ {/* Subscriptions Nested Details */}
-

- Ongoing subscriptions -

+
+

+ Ongoing subscriptions +

+ {onViewSubscriptions && ( + + )} +
{!loggedInUser.active_subscriptions || loggedInUser.active_subscriptions.length === 0 ? (
diff --git a/src/components/layout/StoreHeader.tsx b/src/components/layout/StoreHeader.tsx index 94a0026..d5c2547 100644 --- a/src/components/layout/StoreHeader.tsx +++ b/src/components/layout/StoreHeader.tsx @@ -18,85 +18,116 @@ export const StoreHeader: React.FC = ({ onOpenAuth, }) => { return ( -
-
-
onSwitchTab('storefront')} - className="flex items-center gap-3 cursor-pointer group" - > -
- -
-
-

- ACUPEDIA -

-

TCM PLATFORM

+
+
+
+
onSwitchTab('storefront')} + className="flex items-center gap-3 cursor-pointer group" + > +
+ +
+
+

+ ACUPEDIA +

+

TCM PLATFORM

+
+ + {/* Desktop Navigation Tabs */} +
- {/* Navigation Tabs */} - +
+ {loggedInUser ? ( + + ) : ( +
+ + +
+ )} +
-
- {loggedInUser ? ( - - ) : ( -
- - -
- )} -
+ {/* Mobile Navigation Tabs */} +
); };