From 0d90508977837bec25f038fe5380e6fb3bc82745 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Fri, 25 Jun 2021 18:24:41 +0530 Subject: converted all the smaller files to tsx --- package-lock.json | 58 ++++++++++++++++++++++++++++++++++++ package.json | 4 +++ src/components/App.js | 33 -------------------- src/components/App.tsx | 31 +++++++++++++++++++ src/components/Header/Header.js | 30 ------------------- src/components/Header/Header.tsx | 30 +++++++++++++++++++ src/components/Menu/HomePageMenu.js | 26 ---------------- src/components/Menu/HomePageMenu.tsx | 26 ++++++++++++++++ src/components/Pages/HomePage.js | 25 ---------------- src/components/Pages/HomePage.tsx | 23 ++++++++++++++ 10 files changed, 172 insertions(+), 114 deletions(-) delete mode 100644 src/components/App.js create mode 100644 src/components/App.tsx delete mode 100644 src/components/Header/Header.js create mode 100644 src/components/Header/Header.tsx delete mode 100644 src/components/Menu/HomePageMenu.js create mode 100644 src/components/Menu/HomePageMenu.tsx delete mode 100644 src/components/Pages/HomePage.js create mode 100644 src/components/Pages/HomePage.tsx diff --git a/package-lock.json b/package-lock.json index 4dd975c..734a6e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,10 @@ "react-router-dom": "^5.2.0", "react-scripts": "4.0.3", "web-vitals": "^1.1.1" + }, + "devDependencies": { + "@types/react-router": "^5.1.15", + "@types/react-router-dom": "^5.1.7" } }, "node_modules/@babel/code-frame": { @@ -2895,6 +2899,12 @@ "@types/node": "*" } }, + "node_modules/@types/history": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.8.tgz", + "integrity": "sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA==", + "dev": true + }, "node_modules/@types/html-minifier-terser": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", @@ -2993,6 +3003,27 @@ "@types/react": "*" } }, + "node_modules/@types/react-router": { + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.15.tgz", + "integrity": "sha512-z3UlMG/x91SFEVmmvykk9FLTliDvfdIUky4k2rCfXWQ0NKbrP8o9BTCaCTPuYsB8gDkUnUmkcA2vYlm2DR+HAA==", + "dev": true, + "dependencies": { + "@types/history": "*", + "@types/react": "*" + } + }, + "node_modules/@types/react-router-dom": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.7.tgz", + "integrity": "sha512-D5mHD6TbdV/DNHYsnwBTv+y73ei+mMjrkGrla86HthE4/PVvL1J94Bu3qABU+COXzpL23T1EZapVVpwHuBXiUg==", + "dev": true, + "dependencies": { + "@types/history": "*", + "@types/react": "*", + "@types/react-router": "*" + } + }, "node_modules/@types/resolve": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", @@ -24102,6 +24133,12 @@ "@types/node": "*" } }, + "@types/history": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.8.tgz", + "integrity": "sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA==", + "dev": true + }, "@types/html-minifier-terser": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", @@ -24200,6 +24237,27 @@ "@types/react": "*" } }, + "@types/react-router": { + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.15.tgz", + "integrity": "sha512-z3UlMG/x91SFEVmmvykk9FLTliDvfdIUky4k2rCfXWQ0NKbrP8o9BTCaCTPuYsB8gDkUnUmkcA2vYlm2DR+HAA==", + "dev": true, + "requires": { + "@types/history": "*", + "@types/react": "*" + } + }, + "@types/react-router-dom": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.7.tgz", + "integrity": "sha512-D5mHD6TbdV/DNHYsnwBTv+y73ei+mMjrkGrla86HthE4/PVvL1J94Bu3qABU+COXzpL23T1EZapVVpwHuBXiUg==", + "dev": true, + "requires": { + "@types/history": "*", + "@types/react": "*", + "@types/react-router": "*" + } + }, "@types/resolve": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", diff --git a/package.json b/package.json index ec08670..ebaf798 100644 --- a/package.json +++ b/package.json @@ -44,5 +44,9 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "devDependencies": { + "@types/react-router": "^5.1.15", + "@types/react-router-dom": "^5.1.7" } } diff --git a/src/components/App.js b/src/components/App.js deleted file mode 100644 index 64057b8..0000000 --- a/src/components/App.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * OpenBills - Self hosted browser app to generate and keep track of simple invoices - * Version - 0 - * Licensed under the MIT license - https://opensource.org/licenses/MIT - * - * Copyright (c) 2021 Vidhu Kant Sharma -*/ - -import React from "react"; -import {BrowserRouter, Route, Switch} from "react-router-dom"; - -import Header from "./Header/Header"; -import HomePage from "./Pages/HomePage"; -import BillingPage from "./Pages/BillingPage"; - -const App = () => { - return ( - <> - -
-
- - - -
404
}/> -
-
- - - ); -} - -export default App; diff --git a/src/components/App.tsx b/src/components/App.tsx new file mode 100644 index 0000000..f7e0348 --- /dev/null +++ b/src/components/App.tsx @@ -0,0 +1,31 @@ +/* + * OpenBills - Self hosted browser app to generate and keep track of simple invoices + * Version - 0 + * Licensed under the MIT license - https://opensource.org/licenses/MIT + * + * Copyright (c) 2021 Vidhu Kant Sharma +*/ + +import React from "react"; +import { BrowserRouter, Route, Switch } from "react-router-dom"; + +import Header from "./Header/Header"; +import HomePage from "./Pages/HomePage"; +import BillingPage from "./Pages/BillingPage"; + +const App: React.FC = () => ( + <> + +
+
+ + + +
404
}/> +
+
+ + +); + +export default App; diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js deleted file mode 100644 index a1bd097..0000000 --- a/src/components/Header/Header.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * OpenBills - Self hosted browser app to generate and keep track of simple invoices - * Version - 0 - * Licensed under the MIT license - https://opensource.org/licenses/MIT - * - * Copyright (c) 2021 Vidhu Kant Sharma -*/ - -import React from "react"; -import {Link} from "react-router-dom"; -import "./Header.scss"; - -const Header = () => { - return ( -
-
-

OpenBills

- -
-
- -
-
- ) -} - -export default Header diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx new file mode 100644 index 0000000..bff61b6 --- /dev/null +++ b/src/components/Header/Header.tsx @@ -0,0 +1,30 @@ +/* + * OpenBills - Self hosted browser app to generate and keep track of simple invoices + * Version - 0 + * Licensed under the MIT license - https://opensource.org/licenses/MIT + * + * Copyright (c) 2021 Vidhu Kant Sharma +*/ + +import React from "react"; +import { Link } from "react-router-dom"; +import "./Header.scss"; + +const Header: React.FC = () => { + return ( +
+
+

OpenBills

+
+ +
+ +
+
+ ) +} + +export default Header diff --git a/src/components/Menu/HomePageMenu.js b/src/components/Menu/HomePageMenu.js deleted file mode 100644 index 92f2a8d..0000000 --- a/src/components/Menu/HomePageMenu.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * OpenBills - Self hosted browser app to generate and keep track of simple invoices - * Version - 0 - * Licensed under the MIT license - https://opensource.org/licenses/MIT - * - * Copyright (c) 2021 Vidhu Kant Sharma -*/ - -import React from "react"; -import {Link} from "react-router-dom"; -import "./HomePageMenu.scss"; - -const HomePageMenu = () => { - return ( -
- - Create Invoice - - - Don't Create Invoice - -
- ) -} - -export default HomePageMenu diff --git a/src/components/Menu/HomePageMenu.tsx b/src/components/Menu/HomePageMenu.tsx new file mode 100644 index 0000000..db0938a --- /dev/null +++ b/src/components/Menu/HomePageMenu.tsx @@ -0,0 +1,26 @@ +/* + * OpenBills - Self hosted browser app to generate and keep track of simple invoices + * Version - 0 + * Licensed under the MIT license - https://opensource.org/licenses/MIT + * + * Copyright (c) 2021 Vidhu Kant Sharma +*/ + +import React from "react"; +import { Link } from "react-router-dom"; +import "./HomePageMenu.scss"; + +const HomePageMenu: React.FC = () => { + return ( +
+ + Create Invoice + + + Don't Create Invoice + +
+ ) +} + +export default HomePageMenu diff --git a/src/components/Pages/HomePage.js b/src/components/Pages/HomePage.js deleted file mode 100644 index face5fd..0000000 --- a/src/components/Pages/HomePage.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * OpenBills - Self hosted browser app to generate and keep track of simple invoices - * Version - 0 - * Licensed under the MIT license - https://opensource.org/licenses/MIT - * - * Copyright (c) 2021 Vidhu Kant Sharma -*/ - -import React/*, { useState, useEffect } */from "react"; -import "./HomePage.scss" -//import axios from "axios"; - -//import BillingPage from "./BillingPage" -import HomePageMenu from "./../Menu/HomePageMenu" - -const HomePage = () => { - return ( -
-

Welcome To OpenBills

- -
- ); -} - -export default HomePage; diff --git a/src/components/Pages/HomePage.tsx b/src/components/Pages/HomePage.tsx new file mode 100644 index 0000000..34a52bd --- /dev/null +++ b/src/components/Pages/HomePage.tsx @@ -0,0 +1,23 @@ +/* + * OpenBills - Self hosted browser app to generate and keep track of simple invoices + * Version - 0 + * Licensed under the MIT license - https://opensource.org/licenses/MIT + * + * Copyright (c) 2021 Vidhu Kant Sharma +*/ + +import React from "react"; +import "./HomePage.scss" + +import HomePageMenu from "./../Menu/HomePageMenu" + +const HomePage: React.FC = () => { + return ( +
+

Welcome To OpenBills

+ +
+ ); +} + +export default HomePage; -- cgit v1.2.3