I have a login component. I Want some code to run when I'm in development mode at the moment. The code is just a "laziness" thing that should only run when in development, where I log in with my own local test user.
My code snippet:
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await base.OnAfterRenderAsync(firstRender);
var authen = await Session.AuthenticateAsync("TestSite", "TestUser", "12345678");
if (authen)
{
NavigationManager.NavigateTo("users");
}
}
Can I wrap my statement here in an if statement like so:
if (Environment.ASPCORE_ENVIRONMENT == "Development") {
// Do my lazy ass hack
}
