From f5542b610e1871b3b47e4d0335db4c38eb48cd29 Mon Sep 17 00:00:00 2001 From: Priyatham-sai-chand Date: Sun, 6 Dec 2020 22:29:40 +0530 Subject: [PATCH] css modules --- .vscode/launch.json | 17 +++ auth/routes/users.js | 18 ++- debug.log | 1 + package-lock.json | 5 + package.json | 2 + src/App.js | 1 - src/components/HomePage.js | 126 +++++++++--------- src/components/Login.js | 6 +- src/components/NavBar.js | 14 +- src/components/Options.js | 2 +- src/components/PricingPlan.js | 2 +- src/components/Stepper.js | 51 +++---- src/components/Tracking.js | 2 +- src/navbar.css | 42 ------ src/{components => }/options.css | 0 src/{components => }/pricing-plan.css | 0 .../stepper.css => stepper.module.css} | 0 src/{components => }/tracking.css | 0 18 files changed, 142 insertions(+), 147 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 debug.log rename src/{components => }/options.css (100%) rename src/{components => }/pricing-plan.css (100%) rename src/{components/stepper.css => stepper.module.css} (100%) rename src/{components => }/tracking.css (100%) diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..1989e4d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/auth/routes/users.js b/auth/routes/users.js index bb51065..185fac0 100644 --- a/auth/routes/users.js +++ b/auth/routes/users.js @@ -5,6 +5,14 @@ const auth = require("../middleware/auth"); const User = require("../schemas/User"); const config = require("config"); +router.get("/", async(req,res) => { + + console.log(config.get('jwtSecret')); + return "

asdf

"; + + +}); + router.post("/register", async (req, res) => { try { let { username,email,phonenumber,password} = req.body; @@ -60,6 +68,7 @@ router.post("/login", async (req, res) => { if (!isMatch) return res.status(400).json({ msg: "Invalid credentials." }); const token = jwt.sign({ id: user._id },config.get('jwtSecret')); + if(token) return res.json res.json({ token, user: { @@ -84,13 +93,14 @@ router.delete("/delete", auth, async (req, res) => { router.post("/tokenIsValid", async (req, res) => { try { const token = req.header("x-auth-token"); - if (!token) return res.json(false); + if (!token) return res.json({error: qwer}); - const verified = jwt.verify(token, process.env.JWT_SECRET); - if (!verified) return res.json(false); + const verified = jwt.verify(token, config.get("jwtSecret")); + + if (!verified) return res.json({error: asdf}); const user = await User.findById(verified.id); - if (!user) return res.json(false); + if (!user) return res.json({error: zxcv}); return res.json(true); } catch (err) { diff --git a/debug.log b/debug.log new file mode 100644 index 0000000..8ea5f04 --- /dev/null +++ b/debug.log @@ -0,0 +1 @@ +[1206/101249.288:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3) diff --git a/package-lock.json b/package-lock.json index 22bacca..1beb0e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7781,6 +7781,11 @@ } } }, + "install": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==" + }, "internal-ip": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", diff --git a/package.json b/package.json index 7f18558..cf64031 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "@testing-library/user-event": "^12.1.10", "axios": "^0.21.0", "bootstrap": "^4.5.3", + "classnames": "^2.2.6", + "install": "^0.13.0", "react": "^17.0.1", "react-bootstrap": "^1.4.0", "react-dom": "^17.0.1", diff --git a/src/App.js b/src/App.js index 708e36c..49f0be7 100644 --- a/src/App.js +++ b/src/App.js @@ -5,7 +5,6 @@ import PricingPlan from "./components/PricingPlan"; import LogInContainer from "./components/LogInContainer"; import { Router,BrowserRouter, Route, Switch } from 'react-router-dom'; import UserContext from "./context/UserContext"; -import Tracking from "./components/Tracking"; import Options from "./components/Options"; import Stepper from './components/Stepper'; diff --git a/src/components/HomePage.js b/src/components/HomePage.js index 4a330dc..25edd98 100644 --- a/src/components/HomePage.js +++ b/src/components/HomePage.js @@ -7,57 +7,53 @@ import NavBar from './NavBar'; class HomePage extends Component { - - - - render(){ return (
< NavBar /> -
+
-
+
-

Adapt to a new place easy peasy.

- +

Adapt to a new place easy peasy.

+ - +
-
- locaft-mockup +
+ locaft-mockup
-
+
-
+
-
-
- -

Easy to use.

+
+
+ +

Easy to use.

Get relocated.We'll take care of everything.

-
- -

Efficient

+
+ +

Efficient

Get highest number of services for lowest cost possible.

-
- -

Relax

+
+ +

Relax

Sit back , we'll do the dirty work.

@@ -65,57 +61,57 @@ class HomePage extends Component {
-
+
-
-
- - - - +
+ indigo-logo + avasa-logo + vrl-logo + nobroker-logo
-
+
-
+
-
-
- -

About Us

+
+
+ +

About Us

Adapting to a new place is always hard in any phase of life. We aim to make it easy.

-
- -

Vision

+
+ +

Vision

Bringing all the basic amenities to the new place before your arrival.

-
- -

Mission

+
+ +

Mission

Getting adapted and familiar to the new place made easy.

@@ -124,16 +120,16 @@ class HomePage extends Component { -
+
-
+
-

Recommend us to your friends !

- - +

Recommend us to your friends !

+ +
-
+

Any comments ?

Your comments are what help us improve.

@@ -141,12 +137,12 @@ class HomePage extends Component {
-