Skip to content

Commit

Permalink
fix: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Jun 4, 2022
1 parent 40f4194 commit 1a6d5f3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions quake_webapp/quake-editor/src/QuakeEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {lighten} from "polished";
import { lighten } from "polished";
import React from 'react';
import Editor from "rich-markdown-editor";
import styled from "styled-components";
Expand Down Expand Up @@ -99,10 +99,6 @@ function QuakeEditor(props: Props) {
return basename.slice(pos + 1); // extract extension ignoring `.`
}

function fileNameByExt(filename: string) {
return new Date().toISOString() + "." + getExtension(filename)
}

// custom editor: https://github.com/outline/outline/blob/main/app/scenes/Document/components/Editor.tsx
// https://github.com/outline/outline/blob/main/app/components/Editor.tsx
const onUploadImage = React.useCallback(
Expand All @@ -119,7 +115,7 @@ function QuakeEditor(props: Props) {
// @ts-expect-error ts-migrate(2339) FIXME: Property 'file' does not exist on type 'File | Blo... Remove this comment to see the full error message
formData.append("file", file.file);
} else {
fileName = fileNameByExt(fileName);
fileName = new Date().toISOString() + "." + getExtension(fileName);
formData.append("file", file);
}

Expand All @@ -132,7 +128,7 @@ function QuakeEditor(props: Props) {

return uploadResponse.text();
},
[entryType, fileNameByExt]
[entryType]
);

return (
Expand Down

0 comments on commit 1a6d5f3

Please sign in to comment.