-
Notifications
You must be signed in to change notification settings - Fork 0
Code review #1
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
base: angular-migration-review
Are you sure you want to change the base?
Code review #1
Conversation
|
|
||
| export class RangeDatePipe implements PipeTransform { | ||
| transform(rangeDates: any, args?: any): any { | ||
| if (rangeDates) { |
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 can be part of shared.module.ts
We can reuse this pipe somewhere else
src/app/angularMaterial.module.ts
Outdated
| MatSelectModule, | ||
| MatToolbarModule | ||
| MatRippleModule, | ||
| MatSnackBarModule |
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.
file name should be kebab-case
|
|
||
| export class ApiService { | ||
|
|
||
| FB_APP_ID = '303059286557418'; |
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.
We don't need this file to handle constants.
Instead, we should use environment files.
| let user = this.cookieService.getCookie("townscript-user"); | ||
| console.log("got user from cookie" + user); | ||
| if (user != null && user.length > 0) { | ||
| this.updateUser(JSON.parse(user)); |
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 console
| } | ||
| return null; | ||
| } | ||
|
|
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.
It can be part of shared module
| </div> | ||
| <div class="flex items-center cursor-pointer" (click)="userMenu=!userMenu" *ngIf="user" matRipple> | ||
| <img class="rounded-full mr-2" width="36" | ||
| [src]="'https://s3.ap-south-1.amazonaws.com/townscript-testing/images/'+user?.s3imagename" /> |
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 hardcoding of baseUrl
| <div class="flex items-center border-b py-2 border-gray-300"> | ||
| <div class="mr-1 leading-none"> | ||
| <img class="rounded-full mr-2" width="45" | ||
| [src]="'https://s3.ap-south-1.amazonaws.com/townscript-testing/images/'+user?.s3imagename" /> |
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 hardcoding of baseUrl
| <img | ||
| src="https://s3.ap-southeast-1.amazonaws.com/common-resources/assets/facebook-min-new.png" /> | ||
| </div> | ||
| <div class="text-sm"> |
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 hardcoding of baseUrl
| export class UserMenuComponent implements OnInit { | ||
|
|
||
| @Input("panelOpen1") panelOpen1: boolean = false; | ||
| @Input("panelOpen2") panelOpen2: boolean = false; |
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.
wrong naming convention
| } | ||
| logout() { | ||
| this.close.emit(); | ||
| this.cookieService.deleteCookie("townscript-user"); |
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.
We can have one method like - deleteUserCookie to avoid passing the name of cookie
Set physical href in header logo
privacy logos update
logos update
No description provided.