I am a JS noob so this is probably poorly thought out. But it is a wip and I dont really care about the quality, just more the learning experience.
8 lines
354 B
JavaScript
8 lines
354 B
JavaScript
export default function urlBuilder(currentRegionSelection, currentTimeSelection, currentAggregateSelection) {
|
|
let url = "https://data.wowtoken.app/token/history/";
|
|
if (currentAggregateSelection !== 'none') {
|
|
url += `${currentAggregateSelection}/`
|
|
}
|
|
url += `${currentRegionSelection}/${currentTimeSelection}.json`
|
|
return url;
|
|
} |