Skip to content

Commit

Permalink
Gender differences are now shown on Incomplete shiny hunts section li…
Browse files Browse the repository at this point in the history
…ke they do in the Complete shiny hunts section
  • Loading branch information
TheMrDew committed Aug 18, 2024
1 parent 0294a69 commit e97adfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Pokedex/Pokedex/Views/User/ShinyHunts.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@
}
</div>
<a href="@this.Url.Action("PokemonWithOnlyId", "Home", new { pokemonId = @s.Pokemon.Id, generationId = @s.Game.GenerationId })" target="_blank">
@if (Model.IsShared)
@if (s.Pokemon.HasGenderDifference && !string.IsNullOrEmpty(s.Gender))
{
<img loading="lazy" class="pokemonListPicture pokemonShinyHuntPokemon" title="Pokémon: @s.Pokemon.Name@((s.Nickname != null) ? string.Concat(" (", s.Nickname, ")") : "")" alt="@s.Pokemon.Name Shiny Image" src="@Url.Content(string.Concat(@Model.AppConfig.WebUrl, @Model.AppConfig.ShinyPokemonImageUrl, s.Pokemon.Id, ".png"))" />
<img loading="lazy" class="pokemonListPicture pokemonShinyHuntPokemon" title="Pokémon: @s.Pokemon.Name@((s.Nickname != null) ? string.Concat(" (", s.Nickname, ")") : "")" alt="s.Pokemon.Name Shiny Image" src="@Url.Content(string.Concat(@Model.AppConfig.WebUrl, @Model.AppConfig.GenderDifferenceShinyGridImageUrl, s.Pokemon.Id, "-", s.Gender.ToLower()[0], ".png"))" onerror = "this.src = '@Url.Content(string.Concat(@Model.AppConfig.WebUrl, @Model.AppConfig.ShinyGridImageUrl, s.Pokemon.Id, ".png"))'; this.onerror = null;" />
}
else
{
<img loading="lazy" class="pokemonListPicture pokemonShinyHuntPokemon" title="Pokémon: @s.Pokemon.Name@((s.Nickname != null) ? string.Concat(" (", s.Nickname, ")") : "")" alt="@s.Pokemon.Name Shiny Image" src="@Url.Content(string.Concat(@Model.AppConfig.WebUrl, @Model.AppConfig.ShinyGridImageUrl, s.Pokemon.Id, ".png"))" />
<img loading="lazy" class="pokemonListPicture pokemonShinyHuntPokemon" title="Pokémon: s.Pokemon.Name@((s.Nickname != null) ? string.Concat(" (", s.Nickname, ")") : "")" alt="s.Pokemon.Name Shiny Image" src="@Url.Content(string.Concat(@Model.AppConfig.WebUrl, @Model.AppConfig.ShinyGridImageUrl, s.Pokemon.Id, ".png"))" onerror = "this.src = '@Url.Content(string.Concat(@Model.AppConfig.WebUrl, @Model.AppConfig.GridImageUrl, s.Pokemon.Id, ".png"))'; this.onerror = null;" />
}
</a>
</div>
Expand Down

0 comments on commit e97adfe

Please sign in to comment.