Skip to content

Commit

Permalink
Add tag links
Browse files Browse the repository at this point in the history
  • Loading branch information
danroth27 committed Feb 24, 2020
1 parent 98a2ca7 commit 16690e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/BestForYouRecipes/Components/RecipeCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
</div>

@code {
Review review;

[Parameter]
public Recipe Recipe { get; set; }
}
7 changes: 4 additions & 3 deletions src/BestForYouRecipes/Components/SearchBox.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
Timer debounceTimer;
string searchQuery;

string SearchQuery
[Parameter]
public string SearchQuery
{
get => searchQuery;
set
{
searchQuery = value;
debounceTimer.Stop();
debounceTimer.Start();
debounceTimer?.Stop();
debounceTimer?.Start();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/BestForYouRecipes/Pages/RecipeDetails.razor
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<h2>Tags</h2>
@foreach (var tag in recipe.Tags)
{
<span class="tag">@tag</span>
<a class="tag" href="@($"tag/{tag}")">@tag</a>
}
<StarRatingReviews Reviews="recipe.Reviews" OnSubmitReview="OnSubmitReview" />
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/BestForYouRecipes/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ header {
}

.tag {
color: inherit;
font-size: 0.8em;
text-decoration: none;
background-color: #eaeaea;
text-transform: uppercase;
padding: 0 4px;
Expand Down

0 comments on commit 16690e6

Please sign in to comment.