diff --git a/src/App.tsx b/src/App.tsx
index 0b63ce61..24c5bae2 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -72,6 +72,28 @@ function AppRoutes({
/>
}
+ />
+
+ }
+ />
+
+ }
+ />
+ = ({ relayPool, onLogout }) => {
const showSettings = location.pathname === '/settings'
const showExplore = location.pathname === '/explore'
- const showMe = location.pathname === '/me'
+ const showMe = location.pathname.startsWith('/me')
+
+ // Extract tab from me routes
+ const meTab = location.pathname === '/me' ? 'highlights' :
+ location.pathname === '/me/highlights' ? 'highlights' :
+ location.pathname === '/me/reading-list' ? 'reading-list' :
+ location.pathname === '/me/archive' ? 'archive' : 'highlights'
// Track previous location for going back from settings/me/explore
useEffect(() => {
@@ -263,7 +269,7 @@ const Bookmarks: React.FC = ({ relayPool, onLogout }) => {
relayPool ? : null
) : undefined}
me={showMe ? (
- relayPool ? : null
+ relayPool ? : null
) : undefined}
toastMessage={toastMessage ?? undefined}
toastType={toastType}
diff --git a/src/components/Me.tsx b/src/components/Me.tsx
index cc2d829e..387e4f78 100644
--- a/src/components/Me.tsx
+++ b/src/components/Me.tsx
@@ -23,14 +23,15 @@ import { faBooks } from '../icons/customIcons'
interface MeProps {
relayPool: RelayPool
+ activeTab?: TabType
}
type TabType = 'highlights' | 'reading-list' | 'archive'
-const Me: React.FC = ({ relayPool }) => {
+const Me: React.FC = ({ relayPool, activeTab: propActiveTab }) => {
const activeAccount = Hooks.useActiveAccount()
const navigate = useNavigate()
- const [activeTab, setActiveTab] = useState('highlights')
+ const [activeTab, setActiveTab] = useState(propActiveTab || 'highlights')
const [highlights, setHighlights] = useState([])
const [bookmarks, setBookmarks] = useState([])
const [readArticles, setReadArticles] = useState([])
@@ -38,6 +39,13 @@ const Me: React.FC = ({ relayPool }) => {
const [error, setError] = useState(null)
const [viewMode, setViewMode] = useState('cards')
+ // Update local state when prop changes
+ useEffect(() => {
+ if (propActiveTab) {
+ setActiveTab(propActiveTab)
+ }
+ }, [propActiveTab])
+
useEffect(() => {
const loadData = async () => {
if (!activeAccount) {
@@ -286,7 +294,7 @@ const Me: React.FC = ({ relayPool }) => {