Added name to map and added default props

This commit is contained in:
Mitchell McCaffrey
2020-04-26 12:26:32 +10:00
parent 049a8f5c00
commit 4c667e9c5f
4 changed files with 26 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ function useDataSource(data, defaultSources) {
if (data.type === "file") {
url = URL.createObjectURL(data.file);
} else if (data.type === "default") {
url = defaultSources[data.name];
url = defaultSources[data.key];
}
setDataSource(url);