-
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
Added YAUS frontend developed in C4GT"22 #56
Added YAUS frontend developed in C4GT"22 #56
Conversation
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
- | Generic High Entropy Secret | 0b25c5c | yaus_c4gt_frontend/src/pages/SignIn.js | View secret |
- | Generic High Entropy Secret | 0b25c5c | yaus_c4gt_frontend/src/pages/SignUp.js | View secret |
- | Generic High Entropy Secret | 423e24d | yaus_c4gt_frontend/src/pages/SignIn.js | View secret |
- | Generic High Entropy Secret | 423e24d | yaus_c4gt_frontend/src/pages/SignUp.js | View secret |
- | Generic High Entropy Secret | d5ccf56 | yaus_c4gt_sdk/sdk-generation/index.ts | 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!
Hi @ChakshuGautam |
|
||
const { Title } = Typography; | ||
const { Header, Footer, Content } = Layout; | ||
const template = [ |
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.
Create the separate assets/icons files for the svg
variables
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 in f619445
async function action() { | ||
let item = { | ||
registration: { | ||
applicationId: "650c50b5-eae9-442e-88de-fc36be10a21b", |
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.
make it a .env variable
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 in 0740edb
}, | ||
}; | ||
|
||
let result = await fetch( |
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.
Can all API calls be shift into the api/index.js
and then functions can be imported
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 in 6333059
<div className="header-col header-nav"> | ||
<Menu mode="horizontal" defaultSelectedKeys={["1"]}> | ||
<Menu.Item key="1"> | ||
<Link to="/dashboard"> |
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.
Shift all the routes to the constants 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 in 0740edb
Input, | ||
Switch, | ||
} from "antd"; | ||
import signinbg from "../assets/images/img-signin.jpg"; |
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.
Make it the relative paths instead of ../assets/images/img-signin.jpg
, it should be directly assets/images/img-signin.jpg
} | ||
const { Title } = Typography; | ||
const { Header, Footer, Content } = Layout; | ||
const template = [ |
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.
This code is reduntant from the SignUp page
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 in b0702c3
async function login() { | ||
let item = { | ||
loginId: email, | ||
password: password, | ||
applicationId: "650c50b5-eae9-442e-88de-fc36be10a21b", | ||
}; | ||
|
||
let result = await fetch("https://fa.chakshu-rd.samagra.io/api/login", { | ||
method: "POST", | ||
credentials: "omit", | ||
headers: { | ||
Authorization: `${process.env.REACT_APP_AUTH_TOKEN}`, |
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.
the above code is reduntatnt please make the single page for this and do the conditional rendering baed on the state variable.
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 in 6333059
</> | ||
) | ||
|
||
const columns = [ |
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.
These columns should serve from either constants or mockdata folder
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 in 20af263
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.
Please make the suggested changes!
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
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.
Please apply linting and prettier globally
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 in 20af263
@@ -0,0 +1,230 @@ | |||
import { Table, Button } from 'antd'; |
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.
Link_Manager file and Recent_Activities file are redundant.
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.
can we remove anyone of these file or we need both of them?
yaus_c4gt_frontend/src/pages/Home.js
Outdated
const dollor = [ | ||
<svg | ||
width="22" | ||
height="22" | ||
viewBox="0 0 20 20" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
key={0} | ||
> | ||
<path | ||
d="M8.43338 7.41784C8.58818 7.31464 8.77939 7.2224 9 7.15101L9.00001 8.84899C8.77939 8.7776 8.58818 8.68536 8.43338 8.58216C8.06927 8.33942 8 8.1139 8 8C8 7.8861 8.06927 7.66058 8.43338 7.41784Z" | ||
fill="#fff" | ||
></path> | ||
<path | ||
d="M11 12.849L11 11.151C11.2206 11.2224 11.4118 11.3146 11.5666 11.4178C11.9308 11.6606 12 11.8861 12 12C12 12.1139 11.9308 12.3394 11.5666 12.5822C11.4118 12.6854 11.2206 12.7776 11 12.849Z" | ||
fill="#fff" | ||
></path> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM11 5C11 4.44772 10.5523 4 10 4C9.44772 4 9 4.44772 9 5V5.09199C8.3784 5.20873 7.80348 5.43407 7.32398 5.75374C6.6023 6.23485 6 7.00933 6 8C6 8.99067 6.6023 9.76515 7.32398 10.2463C7.80348 10.5659 8.37841 10.7913 9.00001 10.908L9.00002 12.8492C8.60902 12.7223 8.31917 12.5319 8.15667 12.3446C7.79471 11.9275 7.16313 11.8827 6.74599 12.2447C6.32885 12.6067 6.28411 13.2382 6.64607 13.6554C7.20855 14.3036 8.05956 14.7308 9 14.9076L9 15C8.99999 15.5523 9.44769 16 9.99998 16C10.5523 16 11 15.5523 11 15L11 14.908C11.6216 14.7913 12.1965 14.5659 12.676 14.2463C13.3977 13.7651 14 12.9907 14 12C14 11.0093 13.3977 10.2348 12.676 9.75373C12.1965 9.43407 11.6216 9.20873 11 9.09199L11 7.15075C11.391 7.27771 11.6808 7.4681 11.8434 7.65538C12.2053 8.07252 12.8369 8.11726 13.254 7.7553C13.6712 7.39335 13.7159 6.76176 13.354 6.34462C12.7915 5.69637 11.9405 5.26915 11 5.09236V5Z" | ||
fill="#fff" | ||
></path> |
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 all the constant variables from 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 in 20af263
yaus_c4gt_frontend/src/pages/Home.js
Outdated
<div className="number"> | ||
<Row align="middle" gutter={[24, 0]}> | ||
<Col xs={18}> | ||
<span>{c.today}</span> |
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.
Please add question mark in object properties
c?.today
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 in 20af263
| ||
| ||
| ||
| ||
| ||
|
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.
Either add margin or padding not a ideal way to give a space.
}; | ||
|
||
const [state, setState] = useState({ | ||
userID: '0fe6ff38-fc46-11ec-b939-0242ac120001', |
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.
Make userID
and project
the env variable
console.log(userData); | ||
axios.post(`${baseUrl}/register`, userData, { headers: headers }).then((response) => { |
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.
At some places we are using axios
and at some places fetch
is used, be consistent with the method
}); | ||
|
||
|
||
const columns = [ |
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.
Shift it to constant 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 in 80396e9
const { pathname } = useLocation(); | ||
const page = pathname.replace("/", ""); | ||
|
||
const dashboard = [ |
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 the svgs from 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.
resolved in 80396e9
Hey @Shruti3004 is there anything that I can help with in this pull request. This PR was mentioned by @ChakshuGautam in Issue 52. |
Marking this a draft since it would be a very big PR to review directly |
Description
PR to add the code developed as part of C4GT" 22
Changes
Added the code developed as part of C4GT" 22
To DO
How to test
yarn test api
Ref : #52