From 2d5e90a441191c6069072280f409c37e0907481e Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Thu, 16 Apr 2026 12:35:52 +0200 Subject: [PATCH] feat: add Trending and AddPodcast pages for podcast discovery and subscription management --- frontend/src/pages/AddPodcast.tsx | 4 ++-- frontend/src/pages/Trending.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/AddPodcast.tsx b/frontend/src/pages/AddPodcast.tsx index 6e61de5..c0a46f4 100644 --- a/frontend/src/pages/AddPodcast.tsx +++ b/frontend/src/pages/AddPodcast.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useState, useEffect } from 'react'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { discoveryService, DiscoveryPodcast } from '../services/discoveryService'; import { podcastService } from '../services/podcastService'; @@ -16,7 +16,7 @@ export default function AddPodcast() { const [rssError, setRssError] = useState(null); const [rssSuccess, setRssSuccess] = useState(null); - useState(() => { + useEffect(() => { const loadUser = async () => { try { const response = await authService.getMe(); diff --git a/frontend/src/pages/Trending.tsx b/frontend/src/pages/Trending.tsx index 1bcb03a..fc99a92 100644 --- a/frontend/src/pages/Trending.tsx +++ b/frontend/src/pages/Trending.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useState, useEffect } from 'react'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { discoveryService, DiscoveryPodcast } from '../services/discoveryService'; import Header from '../components/Header'; @@ -10,7 +10,7 @@ export default function Trending() { const [user, setUser] = useState(null); const [subscribingId, setSubscribingId] = useState(null); - useState(() => { + useEffect(() => { const loadUser = async () => { try { const response = await authService.getMe();