Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: show download banner only on android
- Loading branch information
Showing
8 changed files
with
81 additions
and
32 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/client/view/components/banner/useShowAppDownloadBanner.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { useContext } from 'react'; | ||
import { EnvContext } from '../context/EnvContext'; | ||
|
||
export const useShowAppDownloadBanner = () => { | ||
const { platform } = useContext(EnvContext); | ||
return platform === 'android'; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import { Platform } from '../../../server/types/platform'; | ||
|
||
export type AppProps = { | ||
assetPath: string; | ||
isMobile: boolean; | ||
appDownloadUrl: string; | ||
platform: Platform; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const PLATFORM_LIST = ['ios', 'android', 'desktop']; | ||
export type Platform = (typeof PLATFORM_LIST)[number]; |