Skip to content

Commit

Permalink
[FIX] ChromieCraft download link (#1134)
Browse files Browse the repository at this point in the history
* [FIX] ChromieCraft download link

* chore: versin

* tech: use feature flag

* chore: delete unused file

* Revert "chore: delete unused file"

This reverts commit 8a6d1f8.

* fix: pr comments

---------

Co-authored-by: Flavio F Lima <[email protected]>
  • Loading branch information
flavioislima and flavioislima authored Oct 29, 2024
1 parent 6a4bacf commit 6ee40de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperplay",
"version": "0.21.0",
"version": "0.21.1",
"private": true,
"main": "build/main/main.js",
"homepage": "./",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const marketWarsDownloadLinks: Record<string, string> = {
chromieCraft: 'https://chromiecraft.com/download',
export const marketWarsLinksFallback: Record<string, string> = {
chromieCraft: 'https://www.chromiecraft.com/en/downloads/',
zip: 'https://bit.ly/3JwHKKX',
archiveOrg: '',
webtorrent: 'https://webtorrent.io/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import TextInputWithIconField from 'frontend/components/UI/TextInputWithIconFiel
import { Button, Images } from '@hyperplay/ui'
import { install } from 'frontend/helpers'
import { signSiweMessage } from 'frontend/helpers/library'
import { marketWarsDownloadLinks } from './constants'
import ContextProvider from 'frontend/state/ContextProvider'
import { useFlags } from 'launchdarkly-react-client-sdk'
import { marketWarsLinksFallback } from './constants'

interface Props {
backdropClick: () => void
Expand Down Expand Up @@ -46,6 +47,10 @@ const ModDialog: React.FC<Props> = ({
crossoverBottle
}) => {
const { t } = useTranslation()
const flags = useFlags()
const marketWarsDownloadLinks =
flags.marketWarsLinks || marketWarsLinksFallback

const [zipFilePath, setZipFilePath] = useState<string>('')
const [installPath, setInstallPath] = useState<string>(
getDefaultInstallPath()
Expand Down

0 comments on commit 6ee40de

Please sign in to comment.