Skip to content

Commit f034a70

Browse files
committed
fix: SA errors
1 parent ddb4ee3 commit f034a70

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Skill/AddSkillDialog.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
<div class="mb-3">
2222
<label for="proficiency">Proficiency</label>
2323
<select class="form-select" id="proficiency" @bind="model.Proficiency">
24-
@foreach (var level in ProficiencyLevel.All)
24+
@foreach (var level in ProficiencyLevel.All.Select(l => l.Key))
2525
{
26-
<option value="@level.Key">@level.Key</option>
26+
<option value="@level">@level</option>
2727
}
2828
</select>
2929
</div>

src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewBlogPost.razor

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@
181181
}
182182
}
183183

184-
private void SetContentFromFile(string content) => model.Content = content;
185-
186184
private async Task PreventNavigationWhenDirty(LocationChangingContext context)
187185
{
188186
if (!model.IsDirty)

src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Components/DateRangeSelector.razor

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<div class="row mb-3">
1+
@using System.Globalization
2+
<div class="row mb-3">
23
<div class="col-sm-6 col-md-4 col-sm-6">
34
<label for="startDate">Since</label>
45
<input type="date" class="form-control" id="startDate" @onchange="StartDateChanged"/>
@@ -12,19 +13,19 @@
1213
[Parameter]
1314
public EventCallback<Filter> FilterChanged { get; set; }
1415

15-
private Filter filter = new();
16+
private readonly Filter filter = new();
1617

1718
private async Task ApplyFilters() => await FilterChanged.InvokeAsync(filter);
1819

1920
private async Task StartDateChanged(ChangeEventArgs args)
2021
{
21-
filter.StartDate = args.Value is string { Length: >0 } dateTime ? DateOnly.Parse(dateTime) : null;
22+
filter.StartDate = args.Value is string { Length: >0 } dateTime ? DateOnly.Parse(dateTime, CultureInfo.CurrentCulture) : null;
2223
await ApplyFilters();
2324
}
2425

2526
private async Task EndDateChanged(ChangeEventArgs args)
2627
{
27-
filter.EndDate = args.Value is string { Length: >0 } dateTime ? DateOnly.Parse(dateTime) : null;
28+
filter.EndDate = args.Value is string { Length: >0 } dateTime ? DateOnly.Parse(dateTime, CultureInfo.CurrentCulture) : null;
2829
await ApplyFilters();
2930
}
3031
}

src/LinkDotNet.Blog.Web/Features/Home/Components/SocialAccounts.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
[Parameter, EditorRequired]
2323
public required Social Social { get; set; }
2424

25-
private record SocialAccount(string Id, bool HasAccount, string? Url, string Name, string Icon);
25+
private sealed record SocialAccount(string Id, bool HasAccount, string? Url, string Name, string Icon);
2626
}

src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/StructuredData.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
await base.OnParametersSetAsync();
4747
}
4848

49-
private class NewsArticle
49+
private sealed class NewsArticle
5050
{
5151
[JsonPropertyName("@context")]
5252
public required string Context { get; set; }

0 commit comments

Comments
 (0)