Skip to content

Commit

Permalink
Remove FTB on request of them. (#1569)
Browse files Browse the repository at this point in the history
Also breaking API changes were done after the documentation was taken down. Rolling back this commit won’t help.
  • Loading branch information
Eskaan authored May 31, 2023
1 parent 17df6d8 commit 97c33ac
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 1,028 deletions.
2 changes: 1 addition & 1 deletion src/app/desktop/utils/getInstances.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const getInstances = async instancesPath => {

// if the launcher has the modloader as an array, convert it to object
if (Array.isArray(config.modloader)) {
// source is the source where the modpack comes from example: ftb
// source is the source where the modpack comes from example: curseforge
// loaderType is the modloader example: forge
const [
loaderType,
Expand Down
49 changes: 0 additions & 49 deletions src/common/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
MICROSOFT_XBOX_LOGIN_URL,
MICROSOFT_XSTS_AUTH_URL,
MINECRAFT_SERVICES_URL,
FTB_API_URL,
JAVA_LATEST_MANIFEST_URL
} from './utils/constants';
import { sortByDate, getMcManifestUrl } from './utils';
Expand All @@ -25,10 +24,6 @@ const axioInstance = axios.create({
}
});

const trackFTBAPI = () => {
ga.sendCustomEvent('FTBAPICall');
};

const trackCurseForgeAPI = () => {
ga.sendCustomEvent('CurseForgeAPICall');
};
Expand Down Expand Up @@ -365,47 +360,3 @@ export const getSearch = async (
const { data } = await axioInstance.get(url, { params });
return data?.data;
};

export const getFTBModpackData = async modpackId => {
trackFTBAPI();
try {
const url = `${FTB_API_URL}/modpack/${modpackId}`;
const { data } = await axios.get(url);
return data;
} catch {
return { status: 'error' };
}
};

export const getFTBModpackVersionData = async (modpackId, versionId) => {
trackFTBAPI();
try {
const url = `${FTB_API_URL}/modpack/${modpackId}/${versionId}`;
const { data } = await axios.get(url);
return data;
} catch {
return { status: 'error' };
}
};
export const getFTBChangelog = async (modpackId, versionId) => {
trackFTBAPI();
try {
const url = `https://api.modpacks.ch/public/modpack/${modpackId}/${versionId}/changelog`;
const { data } = await axios.get(url);
return data;
} catch {
return { status: 'error' };
}
};

export const getFTBMostPlayed = async () => {
trackFTBAPI();
const url = `${FTB_API_URL}/modpack/popular/plays/1000`;
return axios.get(url);
};

export const getFTBSearch = async searchText => {
trackFTBAPI();
const url = `${FTB_API_URL}/modpack/search/1000?term=${searchText}`;
return axios.get(url);
};
20 changes: 0 additions & 20 deletions src/common/modals/AddInstance/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ import {
import { LoadingOutlined } from '@ant-design/icons';
import { Spin, Radio } from 'antd';
import CurseForgeModpacks from './CurseForgeModpacks';
import FTBModpacks from './FTBModpacks';
import Import from './Import';
import NewInstance from './NewInstance';
import minecraftIcon from '../../assets/minecraftIcon.png';
import curseForgeIcon from '../../assets/curseforgeIcon.webp';
import ftbIcon from '../../assets/ftbIcon.webp';

const Content = ({
in: inProp,
Expand Down Expand Up @@ -44,11 +42,6 @@ const Content = ({
importZipPath={importZipPath}
setImportZipPath={setImportZipPath}
setOverrideNextStepOnClick={setOverrideNextStepOnClick}
/>,
<FTBModpacks
setVersion={setVersion}
setStep={setStep}
setModpack={setModpack}
/>
];

Expand Down Expand Up @@ -103,19 +96,6 @@ const Content = ({
/>
CurseForge
</Radio.Button>
{/* <Radio.Button value={3} disabled>ATLauncher</Radio.Button>
<Radio.Button value={4} disabled>Technic</Radio.Button> */}
<Radio.Button value={3}>
<img
src={ftbIcon}
css={`
margin-right: 4px;
cursor: pointer;
width: 20px;
`}
/>
FTB
</Radio.Button>
<Radio.Button value={2}>
<FontAwesomeIcon
icon={faArchive}
Expand Down
251 changes: 0 additions & 251 deletions src/common/modals/AddInstance/FTBModpacks/ModpacksListWrapper.js

This file was deleted.

Loading

0 comments on commit 97c33ac

Please sign in to comment.