Skip to content

Commit

Permalink
fix: default selected tab id
Browse files Browse the repository at this point in the history
  • Loading branch information
rossbulat committed Aug 14, 2024
1 parent 32f018f commit c7a750e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Router = () => {

// Gets the active task component for the tab, or the default component otherwise.
const getActiveTaskComponent = (): ReactNode => {
// Fall back to splash page if active tab is 0 (no tab).
// Fall back to splash page if active tab is 0 (no tab)
if (tabId === 0) {
return <Splash />;
}
Expand Down
2 changes: 1 addition & 1 deletion src/contexts/Tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const TabsProvider = ({ children }: { children: ReactNode }) => {

// Current active tab id.
const [selectedTabId, setSelectedTabIdState] = useState<number>(
local.getSelectedTabId() || 0
local.getSelectedTabId() || tabs?.[0]?.id || 0
);

// Current active tab index.
Expand Down

0 comments on commit c7a750e

Please sign in to comment.