Files
WatchIt/WatchIt.Website/Components/Subcomponents/Common/Authorization.razor

26 lines
431 B
Plaintext

@inherits Component
@if (BaseLayout.AuthorizationLoaded)
{
if (BaseLayout.AuthorizedAccount is null || (Admin && !BaseLayout.AuthorizedAccount.IsAdmin))
{
if (NotAuthorized is not null)
{
@(NotAuthorized)
}
}
else
{
if (Authorized is not null)
{
@(Authorized)
}
}
}
else
{
if (Loading is not null)
{
@(Loading)
}
}