Skip to content

Commit

Permalink
https://code.visualstudio.com/docs/typescript/typescript-compiling#_u…
Browse files Browse the repository at this point in the history
…sing-the-workspace-version-of-typescript

facebook/create-react-app#10144

^ Fix for the newest version of react 17 and "react-jsx" tag.
  • Loading branch information
steviss committed Dec 1, 2020
1 parent 9fc7cf1 commit 6ee3877
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
40 changes: 30 additions & 10 deletions src/App.tsx
@@ -1,25 +1,45 @@
import { Container, Drawer, Grid } from '@material-ui/core';
import React from 'react';
import { Container, Drawer, Grid, ThemeProvider } from '@material-ui/core';
import { createMuiTheme } from '@material-ui/core/styles';
import Routes from '@routes';
import { StoreProvider } from '@stores';
import React from 'react';
import { drawerStyle, wrapperStyle } from '@styles';
import './App.css';

const theme = createMuiTheme({
palette: {
primary: {
light: '#757ce8',
main: '#3f50b5',
dark: '#002884',
contrastText: '#fff',
},
secondary: {
light: '#ff7961',
main: '#f44336',
dark: '#ba000d',
contrastText: '#000',
},
},
});

const App: React.FC = () => {
var isIE11 = !!window.MSInputMethodContext;
if (isIE11) alert('(This site is not optimized for IE. Please use Chrome or Firefox or Edge)');
const wrapperCSS = wrapperStyle();
const drawerCSS = drawerStyle();
return (
<StoreProvider>
<Drawer anchor="right" classes={drawerCSS} />
<main className={wrapperCSS.root}>
<Container maxWidth="lg" className={wrapperCSS.container}>
<Grid container spacing={3}>
<Routes />
</Grid>
</Container>
</main>
<ThemeProvider theme={theme}>
<Drawer anchor="right" classes={drawerCSS} />
<main className={wrapperCSS.root}>
<Container maxWidth="lg" className={wrapperCSS.container}>
<Grid container spacing={3}>
<Routes />
</Grid>
</Container>
</main>
</ThemeProvider>
</StoreProvider>
);
};
Expand Down
2 changes: 1 addition & 1 deletion url-shortner-frontend.code-workspace
Expand Up @@ -5,5 +5,5 @@
"path": "."
}
],
"settings": {}
"settings": { "typescript.tsdk": "node_modules/typescript/lib" }
}

0 comments on commit 6ee3877

Please sign in to comment.