This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wait = (time) => { | |
return new Promise((resolve) => { | |
setTimeout(resolve, time); | |
}); | |
}; | |
// Fake polling data | |
const fakeData = [null, null, null, { data: { foo: 'bar' } }]; | |
let i = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Wait utility | |
const wait = (timeInMs) => { | |
return new Promise((resolve) => { | |
setTimeout(resolve, timeInMs); | |
}); | |
}; | |
let i = 0; | |
// Fake real time data stream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mock data | |
const fakePaginatedData = [ | |
{ | |
next: 'https://fake-api.com/cars?page=2', | |
results: [ | |
{ model: 'Volvo XC40', year: '2020', price: '30000' }, | |
{ model: 'Renault Clio', year: '2019', price: '10000' }, | |
{ model: 'Toyota Aygo', year: '2022', price: '20000' }, | |
], | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--black: rgb(13, 13, 13); | |
--darkest-gray: rgb(24, 25, 32); | |
--dark-gray: rgb(79, 79, 79); | |
--medium-gray: rgb(130, 130, 130); | |
--gray: rgb(189, 189, 189); | |
--light-gray: rgb(224, 224, 224); | |
--lightest-gray: rgb(242, 242, 242); | |
--white: rgb(250, 250, 250); | |
--purple: rgb(101, 82, 224); |
OlderNewer