File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/Garage.Web/Components/Pages Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -82,17 +82,17 @@ You should see the statistics header toggle on and off based on your feature fla
82822 . Configure OpenFeature in Extensions file
8383
8484 - Open ` src/Garage.ServiceDefaults/Extensions.cs `
85- - Add OpenFeature services in the ` AddFeatureFlags ` method
85+ - Add OpenFeature services in the ` AddFeatureFlags ` method, you can ignore the error for now
8686
87873 . Implement a Custom Provider
8888
8989 - Create a new class ` CustomFeatureProvider ` in ` src/Garage.ServiceDefaults/Providers `
9090 - Use the ` FeatureProvider ` flags. Tip: You can copy the dictionary from ` FeatureFlags.cs ` to start
9191 - Add the provider to the OpenFeature configuration in ` Extensions.cs `
9292
93- 4 . Replace the IFeatureFlags Implementation
93+ 4 . Replace the IFeatureFlags depenency injection
9494
95- - Modify the ` IFeatureFlags ` interface to use OpenFeature ` IFeatureClient `
95+ - Modify the usages of ` IFeatureFlags ` interface to use OpenFeature ` IFeatureClient ` instead
9696
97975 . Make sure to use the UserId in the OpenFeature context
9898
Original file line number Diff line number Diff line change 8686
8787 protected override async Task OnInitializedAsync ()
8888 {
89- // Initialize user ID from local storage
90- await GetUserId ();
91-
9289 try
9390 {
9491 var winnersArray = await WinnersApi .GetAllWinnersAsync ();
103100 }
104101 }
105102
103+ protected override async Task OnAfterRenderAsync (bool firstRender )
104+ {
105+ // Initialize user ID from local storage
106+ await GetUserId ();
107+ StateHasChanged ();
108+ }
109+
106110 private async Task GetUserId ()
107111 {
108112 try
You can’t perform that action at this time.
0 commit comments