-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
…see if server is active
5f0e6ec
to
ecc5b77
Compare
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
ecc5b77
to
50afa96
Compare
src/app/lib/utils.tsx
Outdated
@@ -1,4 +1,5 @@ | |||
import { faker } from '@faker-js/faker'; | |||
import axios from 'axios'; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
src/app/lib/utils.tsx
Outdated
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'; |
There was a problem hiding this comment.
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?
looks good to me. |
40ccc1c
to
6c8b8b1
Compare
Fetching data from the server and populating the revised look of the driver and constructor standings.