[frontend/pages] Improve state handling for no emojis
This commit is contained in:
parent
af580eeed1
commit
be16fe8e5d
2 changed files with 4 additions and 4 deletions
|
@ -57,9 +57,9 @@
|
|||
</div>
|
||||
}
|
||||
}
|
||||
@if (State is State.Empty)
|
||||
@if (State is State.Empty || (State is State.Loaded && Categories.Count == 0))
|
||||
{
|
||||
<i>This instance has no emojis</i>
|
||||
@Loc["No emojis were found"]
|
||||
}
|
||||
@if (State is State.Loading)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
}
|
||||
@if (State is State.Empty)
|
||||
{
|
||||
<i>This instance hasn't received remote emojis</i>
|
||||
<i>@Loc["No emojis were found"]</i>
|
||||
}
|
||||
@if (State is State.Loading)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@
|
|||
PaginationData = res.Links;
|
||||
Emojis = res.Data;
|
||||
|
||||
State = State.Loaded;
|
||||
State = Emojis.Count == 0 ? State.Empty : State.Loaded;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue