From 9b1a3585e66c9df3245d588d6cb1c75888e4e14d Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Wed, 4 Feb 2026 11:24:19 -0500 Subject: [PATCH] fix --- src/App.tsx | 102 ++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 52 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 8a02cf3..ddc78ac 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,45 +1,47 @@ -import { createSignal } from "solid-js" -import { Layout } from "./components/Layout" -import { Navigation } from "./components/Navigation" -import { TabNavigation } from "./components/TabNavigation" -import { SyncPanel } from "./components/SyncPanel" -import { FeedList } from "./components/FeedList" -import { LoginScreen } from "./components/LoginScreen" -import { CodeValidation } from "./components/CodeValidation" -import { OAuthPlaceholder } from "./components/OAuthPlaceholder" -import { SyncProfile } from "./components/SyncProfile" -import { SearchPage } from "./components/SearchPage" -import { DiscoverPage } from "./components/DiscoverPage" -import { useAuthStore } from "./stores/auth" -import { useFeedStore } from "./stores/feed" -import { FeedVisibility } from "./types/feed" -import { useAppKeyboard } from "./hooks/useAppKeyboard" -import type { TabId } from "./components/Tab" -import type { AuthScreen } from "./types/auth" +import { createSignal } from "solid-js"; +import { Layout } from "./components/Layout"; +import { Navigation } from "./components/Navigation"; +import { TabNavigation } from "./components/TabNavigation"; +import { SyncPanel } from "./components/SyncPanel"; +import { FeedList } from "./components/FeedList"; +import { LoginScreen } from "./components/LoginScreen"; +import { CodeValidation } from "./components/CodeValidation"; +import { OAuthPlaceholder } from "./components/OAuthPlaceholder"; +import { SyncProfile } from "./components/SyncProfile"; +import { SearchPage } from "./components/SearchPage"; +import { DiscoverPage } from "./components/DiscoverPage"; +import { useAuthStore } from "./stores/auth"; +import { useFeedStore } from "./stores/feed"; +import { FeedVisibility } from "./types/feed"; +import { useAppKeyboard } from "./hooks/useAppKeyboard"; +import type { TabId } from "./components/Tab"; +import type { AuthScreen } from "./types/auth"; export function App() { - const [activeTab, setActiveTab] = createSignal("discover") - const [authScreen, setAuthScreen] = createSignal("login") - const [showAuthPanel, setShowAuthPanel] = createSignal(false) - const [inputFocused, setInputFocused] = createSignal(false) - const auth = useAuthStore() - const feedStore = useFeedStore() + const [activeTab, setActiveTab] = createSignal("settings"); + const [authScreen, setAuthScreen] = createSignal("login"); + const [showAuthPanel, setShowAuthPanel] = createSignal(false); + const [inputFocused, setInputFocused] = createSignal(false); + const auth = useAuthStore(); + const feedStore = useFeedStore(); // Centralized keyboard handler for all tab navigation and shortcuts useAppKeyboard({ - get activeTab() { return activeTab() }, + get activeTab() { + return activeTab(); + }, onTabChange: setActiveTab, inputFocused: inputFocused(), onAction: (action) => { if (action === "escape") { - setShowAuthPanel(false) - setInputFocused(false) + setShowAuthPanel(false); + setInputFocused(false); } }, - }) + }); const renderContent = () => { - const tab = activeTab() + const tab = activeTab(); switch (tab) { case "feeds": @@ -52,7 +54,7 @@ export function App() { // Would open feed detail view }} /> - ) + ); case "settings": // Show auth panel or sync panel based on state @@ -62,12 +64,12 @@ export function App() { { - auth.logout() - setShowAuthPanel(false) + auth.logout(); + setShowAuthPanel(false); }} onManageSync={() => setShowAuthPanel(false)} /> - ) + ); } switch (authScreen()) { @@ -77,7 +79,7 @@ export function App() { focused={true} onBack={() => setAuthScreen("login")} /> - ) + ); case "oauth": return ( setAuthScreen("login")} onNavigateToCode={() => setAuthScreen("code")} /> - ) + ); case "login": default: return ( @@ -94,7 +96,7 @@ export function App() { onNavigateToCode={() => setAuthScreen("code")} onNavigateToOAuth={() => setAuthScreen("oauth")} /> - ) + ); } } @@ -122,12 +124,10 @@ export function App() { - ) + ); case "discover": - return ( - - ) + return ; case "search": return ( @@ -135,23 +135,23 @@ export function App() { focused={!inputFocused()} onInputFocusChange={setInputFocused} onSubscribe={(result) => { - const feeds = feedStore.feeds() + const feeds = feedStore.feeds(); const alreadySubscribed = feeds.some( (feed) => feed.podcast.id === result.podcast.id || - feed.podcast.feedUrl === result.podcast.feedUrl - ) + feed.podcast.feedUrl === result.podcast.feedUrl, + ); if (!alreadySubscribed) { feedStore.addFeed( { ...result.podcast, isSubscribed: true }, result.sourceId, - FeedVisibility.PUBLIC - ) + FeedVisibility.PUBLIC, + ); } }} /> - ) + ); case "player": default: @@ -163,20 +163,18 @@ export function App() { Player - coming in later phases - ) + ); } - } + }; return ( } - footer={ - - } + footer={} > {renderContent()} - ) + ); }