Skip to content

Commit

Permalink
refactor: remove unused field, usings
Browse files Browse the repository at this point in the history
Refs: BLOCKLY-T-5
  • Loading branch information
StepanSSA committed Sep 10, 2024
1 parent c9b7c66 commit ca504b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
9 changes: 1 addition & 8 deletions src/Sitko.EditorJS.Blazor/EditorJS.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Microsoft.JSInterop;
using Sitko.Blazor.ScriptInjector;
using Sitko.EditorJS.Blocks;
using Sitko.EditorJS.Blocks.Paragraph;
using Sitko.EditorJS.Configuration;
using Sitko.EditorJS.Data;

Expand All @@ -16,7 +15,6 @@ public partial class EditorJS : InputBase<EditorJSData>, IAsyncDisposable
private static readonly JsonSerializerOptions PrettyPrintJsonOptions = new() { WriteIndented = true };

private DotNetObjectReference<EditorJS>? instance;
private bool rendered;
[Inject] protected AntiforgeryStateProvider AntiForgery { get; set; } = null!;
[Inject] protected IScriptInjector ScriptInjector { get; set; } = null!;
[Inject] protected IBlocksAccessor BlocksAccessor { get; set; } = null!;
Expand Down Expand Up @@ -69,16 +67,11 @@ await ScriptInjector.InjectAsync(ScriptInjectRequest.Inline(Id.ToString(), $$"""
{
await JsRuntime.InvokeVoidAsync("window.SitkoEditorJS.init", cancellationToken, Id.ToString(),
instance, CurrentValue);
rendered = true;
}, cancellationToken);

private string GetConfig() => Config ?? BlocksAccessor.GetConfig(Id);

private ValueTask DestroyEditor()
{
rendered = false;
return JsRuntime.InvokeVoidAsync("window.SitkoEditorJS.destroy", Id);
}
private ValueTask DestroyEditor() => JsRuntime.InvokeVoidAsync("window.SitkoEditorJS.destroy", Id);

[JSInvokable]
public Task OnSave(EditorJSData data)
Expand Down
6 changes: 1 addition & 5 deletions src/Sitko.EditorJS.MudBlazor/Display/MudBlocksList.razor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using Microsoft.AspNetCore.Components;
using Sitko.EditorJS.Blocks;
using Sitko.EditorJS.Data;

namespace Sitko.EditorJS.MudBlazor.Display;
namespace Sitko.EditorJS.MudBlazor.Display;

public partial class MudBlocksList;

0 comments on commit ca504b9

Please sign in to comment.