Removed status bar, replaced with Show: Stats command

This commit is contained in:
Zef Hemel
2022-08-01 11:04:48 +02:00
parent 525b30c9bb
commit ec7c272594
6 changed files with 30 additions and 42 deletions
-19
View File
@@ -1,19 +0,0 @@
import { EditorView } from "@codemirror/view";
import * as util from "../../common/util";
export function StatusBar({ editorView }: { editorView?: EditorView }) {
let wordCount = 0,
readingTime = 0;
if (editorView) {
let text = editorView.state.sliceDoc();
wordCount = util.countWords(text);
readingTime = util.readingTime(wordCount);
}
return (
<div id="sb-status-bar">
<div className="inner">
{wordCount} words | {readingTime} min
</div>
</div>
);
}