mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
42 lines
734 B
Plaintext
42 lines
734 B
Plaintext
@using Management.Web.Shared.Components
|
|
@inject QuizEditorContext quizContext
|
|
|
|
@code {
|
|
private Modal? modal { get; set; }
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
quizContext.StateHasChanged += reload;
|
|
}
|
|
private void reload()
|
|
{
|
|
if (quizContext.Quiz != null)
|
|
{
|
|
//initialize
|
|
modal?.Show();
|
|
this.InvokeAsync(this.StateHasChanged);
|
|
}
|
|
}
|
|
public void Dispose()
|
|
{
|
|
quizContext.StateHasChanged -= reload;
|
|
}
|
|
}
|
|
|
|
<Modal @ref="modal" OnHide="() => quizContext.Quiz = null" >
|
|
<Title>
|
|
@quizContext.Quiz?.Name
|
|
</Title>
|
|
<Body>
|
|
|
|
</Body>
|
|
<Footer>
|
|
<button
|
|
class="btn btn-primary"
|
|
@onclick="() => modal?.Hide()"
|
|
>
|
|
Done
|
|
</button>
|
|
</Footer>
|
|
</Modal>
|