From 2c5fa193541eb8b74974731d01312f73951bca17 Mon Sep 17 00:00:00 2001
From: eug-vs
Date: Sat, 18 Apr 2020 20:26:32 +0300
Subject: style: correct some errors with eslint --fix
---
src/index.tsx | 73 +++++++++++++++++++++++++++++------------------------------
1 file changed, 36 insertions(+), 37 deletions(-)
(limited to 'src/index.tsx')
diff --git a/src/index.tsx b/src/index.tsx
index a9a7012..ac7bfc2 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -27,23 +27,23 @@ const useStyles = makeStyles(theme => ({
display: 'flex',
justifyContent: 'center',
marginTop: theme.spacing(4),
- }
+ },
}));
-const Icon =
+const Icon = ;
const headerContents = {
home: null,
- 'spacevim': null,
+ spacevim: null,
'material-ui': null,
- 'custom': null,
+ custom: null,
'live preview': null,
};
const pageMap: Record = {
home: 'https://raw.githubusercontent.com/eug-vs/react-benzin/develop/README.md',
- 'spacevim': 'https://raw.githubusercontent.com/spacevim/spacevim/master/README.md',
+ spacevim: 'https://raw.githubusercontent.com/spacevim/spacevim/master/README.md',
'material-ui': 'https://raw.githubusercontent.com/mui-org/material-ui/master/README.md',
};
@@ -54,11 +54,11 @@ const CustomPage: React.FC = () => {
const handleParseUrl = (): void => {
setUrl(inputEl.current?.value || '');
- }
+ };
return (
<>
-
+
This should be a link to a valid markdown file. Response should give the file contents.
If you copy README file from GitHub, make sure you provide link to raw view.
@@ -72,14 +72,14 @@ const CustomPage: React.FC = () => {
label="Markdown url"
/>
-
+
Render!
>
);
-}
+};
interface LivePropTypes {
setLivePreviewData: (livePreviewData: string) => void;
@@ -90,11 +90,11 @@ const LivePreviewPage: React.FC = ({ setLivePreviewData }) => {
const handleRender = (): void => {
setLivePreviewData(inputEl.current?.value || '');
- }
+ };
return (
<>
-
+
Start typing and see your text rendered on the left window! We recommend starting with # Header.
@@ -111,8 +111,8 @@ const LivePreviewPage: React.FC = ({ setLivePreviewData }) => {
>
- )
-}
+ );
+};
const App: React.FC = () => {
@@ -122,7 +122,7 @@ const App: React.FC = () => {
const handleGoLivePreview = (): void => {
setPage('live preview');
- }
+ };
const url = pageMap[page];
const fileName = url?.slice(url.lastIndexOf('/') + 1);
@@ -153,35 +153,34 @@ const App: React.FC = () => {
{
- (page === 'custom') ?
-
- :
- (page === 'live preview') ?
-
- :
-
+ (page === 'custom')
+ ?
+ : (page === 'live preview')
+ ?
+ :
}
{
- (page === 'live preview') ?
-
- :
- <>
-
-
-
- Try it yourself!
-
-
- >
+ (page === 'live preview')
+ ?
+ : (
+ <>
+
+
+
+ Try it yourself!
+
+
+ >
+ )
}
--
cgit v1.2.3