Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver & Constructor Standings from Server #11

Merged
merged 4 commits into from
Jan 24, 2024
Merged

Conversation

Lombardoc4
Copy link
Contributor

Fetching data from the server and populating the revised look of the driver and constructor standings.

@Lombardoc4 Lombardoc4 force-pushed the standings-test branch 2 times, most recently from 5f0e6ec to ecc5b77 Compare January 22, 2024 17:12
Initialize the use of standings data from the server
Refactor the drivers and constructors standings ui
Include results type declarations at results.d.ts
Update faker data to match standings schema
@@ -1,4 +1,5 @@
import { faker } from '@faker-js/faker';
import axios from 'axios';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Lombardoc4 is there any particular reason to use axios over fetch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little more comfortability in the moment. Going to refactor this away along with faker in next rev to start to properly handle server errors.

export const fetchAPI = async (endpoint: string) => {
const server = document.body.classList.contains('server');
const dummy: string[] | ISchedule[] | false =
const serverURL = 'http://127.0.0.1:8081';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this to a dedicated constants file?

@borolepratik
Copy link
Contributor

looks good to me.

borolepratik
borolepratik previously approved these changes Jan 23, 2024
@Lombardoc4 Lombardoc4 merged commit 0aac508 into dev Jan 24, 2024
3 checks passed
@Lombardoc4 Lombardoc4 deleted the standings-test branch January 24, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants