Skip to content

Commit

Permalink
Attempt to fix uri.
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcanosantana committed Nov 26, 2023
1 parent 3cd66af commit 50b284a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Pages/Dashboard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Link de afiliado</label>
<textarea id="uri-text-area" value="@GetAbsoluteUri()" class="form-control" rows="2" readonly></textarea>
<textarea id="uri-text-area" value="@GetAbsoluteUri()" class="form-control" rows="3" readonly></textarea>
</div>

</form>
Expand All @@ -49,6 +49,10 @@

private String GetAbsoluteUri()
{
return NavigationManager.ToAbsoluteUri("/aff/").ToString() + @UserService.GetLoggedUser().GetId();
//Detect if it's from localhost or online, change the uri depending of that

return NavigationManager.BaseUri.ToString() + "aff/" + @UserService.GetLoggedUser().GetId();

Check warning on line 55 in Pages/Dashboard.razor

View workflow job for this annotation

GitHub Actions / deploy-to-github-pages

Dereference of a possibly null reference.
//return NavigationManager.ToAbsoluteUri("/aff/").ToString() + @UserService.GetLoggedUser().GetId();
}
}

0 comments on commit 50b284a

Please sign in to comment.