aboutsummaryrefslogtreecommitdiffstats
path: root/webui
diff options
context:
space:
mode:
authorludovicm67 <ludovicmuller1@gmail.com>2020-01-31 12:18:19 +0100
committerQuentin Gliech <quentingliech@gmail.com>2020-02-11 20:54:36 +0100
commitaea42344ded1708361e7e1d577e9c6aa370ad64e (patch)
treeea9e14c64027155d43b5896b083d7b86bc9ae382 /webui
parentf105f3bbdfd7b0fb2aa2ddd54719eba725cd5e07 (diff)
downloadgit-bug-aea42344ded1708361e7e1d577e9c6aa370ad64e.tar.gz
webui: transform index and App to TypeScript
Diffstat (limited to 'webui')
-rw-r--r--webui/package-lock.json27
-rw-r--r--webui/package.json1
-rw-r--r--webui/src/App.tsx (renamed from webui/src/App.js)11
-rw-r--r--webui/src/index.tsx (renamed from webui/src/index.js)0
-rw-r--r--webui/src/react-app-env.d.ts1
-rw-r--r--webui/tsconfig.json25
6 files changed, 62 insertions, 3 deletions
diff --git a/webui/package-lock.json b/webui/package-lock.json
index 9d8a3c57..ac07e78e 100644
--- a/webui/package-lock.json
+++ b/webui/package-lock.json
@@ -2284,6 +2284,12 @@
"@types/node": "*"
}
},
+ "@types/history": {
+ "version": "4.7.4",
+ "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.4.tgz",
+ "integrity": "sha512-+o2igcuZA3xtOoFH56s+MCZVidwlJNcJID57DSCyawS2i910yG9vkwehCjJNZ6ImhCR5S9DbvIJKyYHcMyOfMw==",
+ "dev": true
+ },
"@types/is-glob": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@types/is-glob/-/is-glob-4.0.1.tgz",
@@ -2483,6 +2489,27 @@
"@types/react": "*"
}
},
+ "@types/react-router": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.4.tgz",
+ "integrity": "sha512-PZtnBuyfL07sqCJvGg3z+0+kt6fobc/xmle08jBiezLS8FrmGeiGkJnuxL/8Zgy9L83ypUhniV5atZn/L8n9MQ==",
+ "dev": true,
+ "requires": {
+ "@types/history": "*",
+ "@types/react": "*"
+ }
+ },
+ "@types/react-router-dom": {
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.3.tgz",
+ "integrity": "sha512-pCq7AkOvjE65jkGS5fQwQhvUp4+4PVD9g39gXLZViP2UqFiFzsEpB3PKf0O6mdbKsewSK8N14/eegisa/0CwnA==",
+ "dev": true,
+ "requires": {
+ "@types/history": "*",
+ "@types/react": "*",
+ "@types/react-router": "*"
+ }
+ },
"@types/react-transition-group": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.2.3.tgz",
diff --git a/webui/package.json b/webui/package.json
index 87dff691..8f00ae91 100644
--- a/webui/package.json
+++ b/webui/package.json
@@ -30,6 +30,7 @@
"devDependencies": {
"@graphql-codegen/cli": "^1.12.1",
"@graphql-codegen/fragment-matcher": "^1.12.1",
+ "@types/react-router-dom": "^5.1.3",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-prettier": "^3.1.2",
"prettier": "^1.19.1"
diff --git a/webui/src/App.js b/webui/src/App.tsx
index b9c57327..d996eed6 100644
--- a/webui/src/App.js
+++ b/webui/src/App.tsx
@@ -1,7 +1,10 @@
import AppBar from '@material-ui/core/AppBar';
import CssBaseline from '@material-ui/core/CssBaseline';
-import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
-import { makeStyles } from '@material-ui/styles';
+import {
+ createMuiTheme,
+ ThemeProvider,
+ makeStyles,
+} from '@material-ui/core/styles';
import Toolbar from '@material-ui/core/Toolbar';
import React from 'react';
import { Route, Switch } from 'react-router';
@@ -20,7 +23,9 @@ const theme = createMuiTheme({
});
const useStyles = makeStyles(theme => ({
- offset: theme.mixins.toolbar,
+ offset: {
+ ...theme.mixins.toolbar,
+ },
filler: {
flexGrow: 1,
},
diff --git a/webui/src/index.js b/webui/src/index.tsx
index 6f838c69..6f838c69 100644
--- a/webui/src/index.js
+++ b/webui/src/index.tsx
diff --git a/webui/src/react-app-env.d.ts b/webui/src/react-app-env.d.ts
new file mode 100644
index 00000000..6431bc5f
--- /dev/null
+++ b/webui/src/react-app-env.d.ts
@@ -0,0 +1 @@
+/// <reference types="react-scripts" />
diff --git a/webui/tsconfig.json b/webui/tsconfig.json
new file mode 100644
index 00000000..f2850b71
--- /dev/null
+++ b/webui/tsconfig.json
@@ -0,0 +1,25 @@
+{
+ "compilerOptions": {
+ "target": "es5",
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "esnext"
+ ],
+ "allowJs": true,
+ "skipLibCheck": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "strict": true,
+ "forceConsistentCasingInFileNames": true,
+ "module": "esnext",
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "react"
+ },
+ "include": [
+ "src"
+ ]
+}