-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration : Frontend #77
Conversation
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
- | Generic Password | caec5c4 | apps/frontend/src/app/apis/index.js | View secret |
- | Generic Password | caec5c4 | apps/frontend/src/app/apis/index.js | View secret |
- | Generic Password | 7cc3d87 | apps/frontend/src/app/apis/index.js | View secret |
- | Generic Password | 7cc3d87 | apps/frontend/src/app/apis/index.js | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
apps/frontend/src/app/Protect.js
Outdated
import { useNavigate } from "react-router-dom"; | ||
|
||
function Protect(props) { | ||
let Cmp = props.Cmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use proper names for variables.
apps/frontend/src/app/apis/index.js
Outdated
email: "[email protected]", | ||
password: "test@123", | ||
}; | ||
const baseUrl = "https://fa.chakshu-rd.samagra.io/api"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
access these from an env or app constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apps/frontend/src/app/apis/index.js
Outdated
console.log( | ||
JSON.stringify({ | ||
registration: { | ||
applicationId: "650c50b5-eae9-442e-88de-fc36be10a21b", // TO DO : Change this to env variable | ||
}, | ||
user: { | ||
name: "test", | ||
email: "[email protected]", | ||
password: "test@123", | ||
}, | ||
}) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unnecessary logs
@media (min-width: 1024px) { | ||
.layout-dashboard .ant-layout-footer { | ||
margin: 0 0 20px 20px; | ||
} | ||
.layout-dashboard .ant-layout-sider.sider-primary { | ||
margin: 20px 0 0 20px; | ||
padding: 13px 20px; | ||
height: calc(100vh - 20px); | ||
} | ||
.layout-dashboard .ant-layout { | ||
width: auto; | ||
flex-shrink: 1; | ||
margin-left: 270px; | ||
} | ||
.layout-dashboard .header-control .sidebar-toggler { | ||
display: none; | ||
} | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.layout-dashboard .ant-layout-header { | ||
margin: 10px 20px; | ||
} | ||
.layout-dashboard .header-control { | ||
margin-top: 0; | ||
} | ||
.layout-dashboard .header-control .header-search { | ||
margin: 0 7px; | ||
} | ||
.layout-dashboard .header-control .btn-sign-in span { | ||
display: inline; | ||
} | ||
.profile-nav-bg { | ||
margin-top: -87.8px; | ||
} | ||
.card-profile-head { | ||
margin: -53px 24px 24px; | ||
} | ||
} | ||
|
||
@media (min-width: 992px) { | ||
.card-billing-info.ant-card .ant-card-body { | ||
display: flex; | ||
} | ||
.layout-dashboard-rtl { | ||
overflow: auto; | ||
} | ||
.layout-dashboard-rtl .ant-layout-sider.sider-primary { | ||
margin: 20px 20px 0 0; | ||
height: calc(100vh - 20px); | ||
} | ||
.layout-dashboard-rtl .ant-layout-sider.sider-primary { | ||
right: 0; | ||
left: auto; | ||
} | ||
.layout-dashboard-rtl .ant-layout-sider.sider-primary { | ||
right: 0; | ||
left: auto; | ||
} | ||
.layout-dashboard-rtl .ant-layout { | ||
margin-right: 270px; | ||
margin-left: 0; | ||
} | ||
.layout-dashboard-rtl .ant-layout-footer { | ||
margin: 0 20px 20px 0; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
min widths should come in ascending order. e.x 768 then 992 then 1024.
margin-top: -87.8px; | ||
} | ||
.card-profile-head { | ||
margin: -53px 24px 24px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
negative margins should be avoided.
const [state, setState] = useState({ | ||
userID: "0fe6ff38-fc46-11ec-b939-0242ac120001", | ||
url: "", | ||
project: "0fe6ff38-fc46-11ec-b939-0242ac120002", | ||
customHashId: nanoid(6), | ||
titleImage: "", | ||
urlImg: "", | ||
description: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be hardcoded like that.
count={12} | ||
style={{ paddingTop: "10px" }} | ||
/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find another way to add spaces. remove this
Progress on this PR Till now
|
apps/frontend/src/app/apis/index.js
Outdated
email: "[email protected]", | ||
password: "test@123", | ||
}; | ||
const baseUrl = "https://fa.chakshu-rd.samagra.io/api"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apps/frontend/src/app/Protect.js
Outdated
@@ -0,0 +1,21 @@ | |||
import React, { useEffect } from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nazi-pikachu can we move this in folder name utils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
apps/frontend/src/app/app.jsx
Outdated
return ( | ||
<div className="App"> | ||
<Routes> | ||
<Route path="/sign-up" element={<SignUp />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nazi-pikachu please create the constants folder for all the routes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
apps/frontend/src/app/app.module.css
Outdated
@@ -0,0 +1 @@ | |||
/* Your styles goes here. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
@@ -0,0 +1,30 @@ | |||
import { piedata } from "app/assets/constants/mockData"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nazi-pikachu please take the constants and styles folder out of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
Description
To migrate the frontend from previous seperate repo to the main repo
Changes Made
Generated a react-app using nx
Related Issues
Testing Instructions
nx serve frontend
Screenshots (if applicable)
Current output
Additional Notes
Its an intial PR in which the frontend code has been migrated to frontend app follow test instructions to know how to run the frontend.