Skip to content

Commit 333644a

Browse files
committed
feat: conditionally display Steam tab based on integration setting
1 parent 38e08f5 commit 333644a

File tree

1 file changed

+9
-3
lines changed
  • src/frontend/screens/Library/components/LibraryTopBar

1 file changed

+9
-3
lines changed

src/frontend/screens/Library/components/LibraryTopBar/index.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Category } from 'frontend/types'
1717
import { observer } from 'mobx-react-lite'
1818
import libraryState from '../../../../state/libraryState'
1919
import storeAuthState from 'frontend/state/storeAuthState'
20+
import { configStore } from 'frontend/helpers/electronStores'
2021

2122
export interface LibraryTopBarInterface {
2223
filters: DropdownItemType[]
@@ -42,6 +43,9 @@ export const LibraryTopBar = observer(
4243
const isGOGLoggedin = storeAuthState.gog.username
4344
const isEpicLoggedin = storeAuthState.epic.username
4445

46+
const enableSteamIntegration =
47+
configStore.get_nodefault('settings.enableSteamIntegration') ?? false
48+
4549
return (
4650
<Tabs
4751
onChange={(val) => {
@@ -72,9 +76,11 @@ export const LibraryTopBar = observer(
7276
<div className="menu">GOG</div>
7377
</Tabs.Tab>
7478
) : null}
75-
<Tabs.Tab value="steam">
76-
<div className="menu">Steam</div>
77-
</Tabs.Tab>
79+
{enableSteamIntegration ? (
80+
<Tabs.Tab value="steam">
81+
<div className="menu">Steam</div>
82+
</Tabs.Tab>
83+
) : null}
7884
<Tabs.Tab value="sideload">
7985
<div className="menu">{t('Other')}</div>
8086
</Tabs.Tab>

0 commit comments

Comments
 (0)