@page "/notes/{id}" @using Iceshrimp.Frontend.Core.Miscellaneous @using Iceshrimp.Frontend.Core.Services @using Iceshrimp.Shared.Schemas @inject ApiService Api
@_note.Text
} else if (_error != null) {Error!: @_error.Error
} else {Fetching note...
} @code { [Parameter] public string Id { get; set; } = null!; private ErrorResponse? _error; private NoteResponse? _note; protected override async Task OnInitializedAsync() { try { _note = await Api.Notes.GetNote(Id) ?? throw new ApiException(new ErrorResponse { StatusCode = 404, Error = "Note not found", RequestId = "-" }); } catch (ApiException e) { _error = e.Response; } } }