Archived
This is unneeded
This commit is contained in:
1 file changed
+1
-9
@@ -9,7 +9,6 @@ import Link from 'next/link'
|
|||||||
|
|
||||||
export default function Download () {
|
export default function Download () {
|
||||||
const [platform, setPlatform] = useState<string | null>(null)
|
const [platform, setPlatform] = useState<string | null>(null)
|
||||||
const [latestVersion, setLatestVersion] = useState<null | string>()
|
|
||||||
const [latestLauncherVersion, setLatestLauncherVersion] = useState<
|
const [latestLauncherVersion, setLatestLauncherVersion] = useState<
|
||||||
null | string
|
null | string
|
||||||
>()
|
>()
|
||||||
@@ -18,19 +17,12 @@ export default function Download () {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchVersions = async () => {
|
const fetchVersions = async () => {
|
||||||
try {
|
try {
|
||||||
const gameRes = await axios.get(
|
|
||||||
'https://berrydashwithguns.lncvrt.xyz/database/getLatestVersion.php',
|
|
||||||
{
|
|
||||||
responseType: 'text'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
const launcherRes = await axios.get(
|
const launcherRes = await axios.get(
|
||||||
'https://berrydash.lncvrt.xyz/database/launcher/latest.php',
|
'https://berrydash.lncvrt.xyz/database/launcher/latest.php',
|
||||||
{
|
{
|
||||||
responseType: 'text'
|
responseType: 'text'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
setLatestVersion((gameRes.data as string).trim())
|
|
||||||
setLatestLauncherVersion((launcherRes.data as string).trim())
|
setLatestLauncherVersion((launcherRes.data as string).trim())
|
||||||
} catch {
|
} catch {
|
||||||
setLatestCheckFailed(true)
|
setLatestCheckFailed(true)
|
||||||
@@ -50,7 +42,7 @@ export default function Download () {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<p className='text-2xl'>Berry Dash with Guns Downloads</p>
|
<p className='text-2xl'>Berry Dash with Guns Downloads</p>
|
||||||
{latestVersion == null || latestLauncherVersion == null ? (
|
{latestLauncherVersion == null ? (
|
||||||
latestCheckFailed ? (
|
latestCheckFailed ? (
|
||||||
<>
|
<>
|
||||||
<p>Failed to load</p>
|
<p>Failed to load</p>
|
||||||
|
|||||||
Reference in new issue
Block a user