Skip to content

Commit

Permalink
Returning a deleted photo and code refactoring
Browse files Browse the repository at this point in the history
*Returned the deleted photo to the about, support and rules pages

*Added a removed css property that exposed information under the photo

*Changed the variable name to be more clear and moved it to the top.
  • Loading branch information
koliaBp committed Aug 29, 2022
1 parent 1dbc29f commit ee55af7
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/app/shared/styles/info.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

&-content {
position: relative;
top: -33px;
text-align: center;
width: 97.6%;
margin: 0 auto 2%;
Expand Down
2 changes: 1 addition & 1 deletion src/app/shell/info/about/about.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ <h2 class="info-title">{{ platformInformation?.title }}</h2>
</div>
</div>
<ng-template #noInfo>
<app-no-result-card [title]="emptyList"></app-no-result-card>
<app-no-result-card [title]="noData"></app-no-result-card>
</ng-template>
</ng-container>
5 changes: 3 additions & 2 deletions src/app/shell/info/about/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ import { NoResultsTitle } from 'src/app/shared/enum/no-results';
styleUrls: ['./about.component.scss'],
})
export class AboutComponent implements OnInit, OnDestroy {
readonly noData = NoResultsTitle.noInfo;

@Select(AdminState.AboutPortal)
platformInformation$: Observable<CompanyInformation>;
@Select(AdminState.isLoading)
isLoading$: Observable<boolean>;

platformInformation: CompanyInformation;

readonly emptyList = NoResultsTitle.noInfo;

private destroy$: Subject<boolean> = new Subject<boolean>();

constructor(private store: Store, private navigationBarService: NavigationBarService) {}
Expand Down
5 changes: 4 additions & 1 deletion src/app/shell/info/info.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<div class="info_wrapper">
<router-outlet></router-outlet>
<div class="info">
<img class="info-picture" src="assets/images/header-about.png">
</div>
<router-outlet></router-outlet>
</div>
2 changes: 1 addition & 1 deletion src/app/shell/info/rules/rules.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ <h2 class="info-title">{{ platformRules?.title }}</h2>
</div>
</div>
<ng-template #noInfo>
<app-no-result-card [title]="emptyList"></app-no-result-card>
<app-no-result-card [title]="noData"></app-no-result-card>
</ng-template>
</ng-container>
3 changes: 2 additions & 1 deletion src/app/shell/info/rules/rules.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ import { NoResultsTitle } from 'src/app/shared/enum/no-results';
})

export class RulesComponent implements OnInit, OnDestroy {
readonly noData = NoResultsTitle.noInfo;

@Select(AdminState.LawsAndRegulations)
platformRules$: Observable<CompanyInformation>;
@Select(AdminState.isLoading)
isLoading$: Observable<boolean>;

platformRules: CompanyInformation;

readonly emptyList = NoResultsTitle.noInfo;
private destroy$: Subject<boolean> = new Subject<boolean>();

constructor(private store: Store, private navigationBarService: NavigationBarService) {}
Expand Down
2 changes: 1 addition & 1 deletion src/app/shell/info/support/support.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ <h2 class="support-title">{{ platformSupport.title }}</h2>
</div>
</div>
<ng-template #noInfo>
<app-no-result-card [title]="emptyList"></app-no-result-card>
<app-no-result-card [title]="noData"></app-no-result-card>
</ng-template>
</ng-container>
3 changes: 2 additions & 1 deletion src/app/shell/info/support/support.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ import { NoResultsTitle } from 'src/app/shared/enum/no-results';
styleUrls: ['./support.component.scss'],
})
export class SupportComponent implements OnInit, OnDestroy {
readonly noData = NoResultsTitle.noInfo;

@Select(AdminState.SupportInformation)
platformSupport$: Observable<CompanyInformation>;
@Select(AdminState.isLoading)
isLoading$: Observable<boolean>;

platformSupport: CompanyInformation;

readonly emptyList = NoResultsTitle.noInfo;
private destroy$: Subject<boolean> = new Subject<boolean>();

constructor(private store: Store, public navigationBarService: NavigationBarService ) { }
Expand Down

0 comments on commit ee55af7

Please sign in to comment.