Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: TTA-115 solve linting
  • Loading branch information
Abigail Cabascango committed Oct 11, 2022
commit 5bc7915af28e54ba88df69b34276a2ac3253e84b
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export class ConnectionDirective implements OnInit {
let networkSatus;
if (/\fast-5g|3g|4g/.test(effectiveType)) {
networkSatus = this.fastSrc;
return
return;
}
if (/\slow-2g|2g/.test(effectiveType)) {
networkSatus = this.slowSrc;
return
return;
}
networkSatus = this.offlineSrc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ export class InternetConnectionStatusComponent implements OnInit {
.subscribe((effectiveType: string) => {

this.connectionType = effectiveType;
if (/\fast-5g|3g|4g/.test(effectiveType)) {

if (/\fast-5g|3g|4g/.test(effectiveType)) {
this.toastrService.error('Your request was not completed, you are offline');
this.isFast = true;
return
return;
}
if (/\slow-2g|2g/.test(effectiveType)) {
this.toastrService.warning('Caution your connection is slow');
this.isFast = false;
return
return;
}
this.isFast = false;
});
Expand Down
4 changes: 2 additions & 2 deletions src/app/modules/shared/services/status-network.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export class StatusNetworkService {

if (effectiveTypenetwork.effectiveType === '2g') {
this.toastrService.warning('Your request was not completed, your connection is slow');
return
return;
}

if (!isError) {
this.toastrService.warning(message);
return
return;
}

const errorMessa = (error.error && error.error.message ? error.error.message :
Expand Down