Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable swarm invitation outside of Swarm Desktop #497

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/pages/account/wallet/AccountWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import ExpandableListItemActions from '../../../components/ExpandableListItemAct
import ExpandableListItemKey from '../../../components/ExpandableListItemKey'
import { Loading } from '../../../components/Loading'
import { SwarmButton } from '../../../components/SwarmButton'
import config from '../../../config'
import { Context } from '../../../providers/Bee'
import { ROUTES } from '../../../routes'
import { AccountNavigation } from '../AccountNavigation'
Expand Down Expand Up @@ -65,9 +66,11 @@ export function AccountWallet(): ReactElement {
<SwarmButton onClick={onCheckTransactions} iconType={Link}>
Check transactions on Blockscout
</SwarmButton>
<SwarmButton onClick={onInvite} iconType={Gift}>
Invite to Swarm...
</SwarmButton>
{config.BEE_DESKTOP_ENABLED && (
<SwarmButton onClick={onInvite} iconType={Gift}>
Invite to Swarm...
</SwarmButton>
)}
</ExpandableListItemActions>
</>
)
Expand Down
3 changes: 2 additions & 1 deletion src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { CryptoTopUpIndex } from './pages/top-up/CryptoTopUpIndex'
import { GiftCardFund } from './pages/top-up/GiftCardFund'
import { GiftCardTopUpIndex } from './pages/top-up/GiftCardTopUpIndex'
import { Swap } from './pages/top-up/Swap'
import config from './config'

export enum ROUTES {
INFO = '/',
Expand Down Expand Up @@ -84,7 +85,7 @@ const BaseRouter = (): ReactElement => (
<Route path={ROUTES.ACCOUNT_FEEDS_NEW} element={<CreateNewFeed />} />
<Route path={ROUTES.ACCOUNT_FEEDS_UPDATE} element={<UpdateFeed />} />
<Route path={ROUTES.ACCOUNT_FEEDS_VIEW} element={<FeedSubpage />} />
<Route path={ROUTES.ACCOUNT_INVITATIONS} element={<GiftCards />} />
{config.BEE_DESKTOP_ENABLED && <Route path={ROUTES.ACCOUNT_INVITATIONS} element={<GiftCards />} />}
</Routes>
)

Expand Down