17 lines
501 B
Plaintext
17 lines
501 B
Plaintext
<img alt="" class="img-fluid" src="@ImagePath" />
|
|
@code {
|
|
public string ImagePath { get; set; } = string.Empty;
|
|
|
|
protected override Task OnInitializedAsync()//(bool firstRender)
|
|
{
|
|
//if (firstRender)
|
|
{
|
|
string[] images = new[] { "d304641b-bfef-4d2f-a715-67184d59b171.jpg", "3db66a22-7e36-4b4a-8d85-3aa27e1c8220.jpg" };
|
|
int ix = Random.Shared.Next(0, images.Length);
|
|
|
|
ImagePath = string.Format("/img/{0}", images[ix]);
|
|
}
|
|
return base.OnInitializedAsync();
|
|
}
|
|
}
|