Skip to content

Commit

Permalink
Merge pull request #73 from suiranfes/mint73/external-json-data
Browse files Browse the repository at this point in the history
chore: update json data source to use external url
  • Loading branch information
mint73 authored Jan 9, 2025
2 parents 0b46605 + 4b511c0 commit 0765507
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions suiran/Pages/Sell.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ protected override async Task OnInitializedAsync()
{
// Read json file
// (Ignore the cache of `sample-data/item.json`)
var cacheBuster = new DateTime().ToString("yyyyMMddHHmmss");
var url = $"sample-data/item.json?{cacheBuster}";
// var cacheBuster = new DateTime().ToString("yyyyMMddHHmmss");
// var url = $"sample-data/item.json?{cacheBuster}";
// Read json file from common data (See: https://github.com/suiranfes/mock-store-datas)
var url = $"https://suiranfes.github.io/mock-store-datas/products.json";
if (Http != null)
itemData = await Http.GetFromJsonAsync<ItemData[]>(url);

Expand Down

0 comments on commit 0765507

Please sign in to comment.