Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
belmirofss committed Oct 3, 2023
1 parent d653d89 commit e252137
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 38 deletions.
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "F1HUB",
"slug": "f1hub",
"scheme": "com.yabcompany.f1hub",
"version": "1.0.1",
"version": "1.0.2",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
Expand All @@ -20,7 +20,7 @@
},
"android": {
"package": "com.yabcompany.f1hub",
"versionCode": 3,
"versionCode": 4,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#121212"
Expand Down
Binary file modified assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"preview": {
"distribution": "internal"
},
"apk": {
"android": {
"buildType": "apk"
}
},
"production": {}
},
"submit": {
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const F1_API = "http://ergast.com/api/f1/";
export const F1_API = "https://ergast.com/api/f1/";
export const COUNTRY_FLAGS_URL = "https://flagsapi.com/";
export const BUY_ME_A_COFFEE_URL = "https://www.buymeacoffee.com/belmirofss";
export const AD_UNIT_ID = "ca-app-pub-6575307967199593/5313345974";
74 changes: 39 additions & 35 deletions src/screens/Archieve/Archieve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,52 @@ export const Archieve = () => {

const { data, isLoading, isError } = useSeasonsList();

if (isLoading) {
return <Loading />;
}

if (isError || !data) {
return <Error />;
}

return (
<ScreenContainer title="Archieve">
<View style={{ marginTop: Theme.space.xs, marginBottom: Theme.space.xs }}>
<Picker
label="Select the season"
selected={selectedSeason}
onSelection={setSelectedSeason}
items={data.MRData.SeasonTable.Seasons.reverse().map((season) => ({
text: `Season ${season.season}`,
value: season.season,
}))}
/>
</View>

{selectedSeason && (
{isLoading ? (
<Loading />
) : isError || !data ? (
<Error />
) : (
<>
<SectionContainer name="Standings" expansable startClosed>
<SwitchDriverConstructor
selected={selectedStandingType}
onChange={setSelectedStandingType}
<View
style={{ marginTop: Theme.space.xs, marginBottom: Theme.space.xs }}
>
<Picker
label="Select the season"
selected={selectedSeason}
onSelection={setSelectedSeason}
items={data.MRData.SeasonTable.Seasons.reverse().map(
(season) => ({
text: `Season ${season.season}`,
value: season.season,
})
)}
/>
</View>

{selectedSeason && (
<>
<SectionContainer name="Standings" expansable startClosed>
<SwitchDriverConstructor
selected={selectedStandingType}
onChange={setSelectedStandingType}
/>

{selectedStandingType === StandingType.DRIVERS && (
<ArchieveDrivers season={selectedSeason} />
)}
{selectedStandingType === StandingType.DRIVERS && (
<ArchieveDrivers season={selectedSeason} />
)}

{selectedStandingType === StandingType.CONSTRUCTORS && (
<ArchieveConstructors season={selectedSeason} />
)}
</SectionContainer>
{selectedStandingType === StandingType.CONSTRUCTORS && (
<ArchieveConstructors season={selectedSeason} />
)}
</SectionContainer>

<SectionContainer name="Calendar" expansable startClosed>
<ArchieveCalendar season={selectedSeason} />
</SectionContainer>
<SectionContainer name="Calendar" expansable startClosed>
<ArchieveCalendar season={selectedSeason} />
</SectionContainer>
</>
)}
</>
)}
</ScreenContainer>
Expand Down

0 comments on commit e252137

Please sign in to comment.