Skip to content

Commit

Permalink
Remove void return
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszGrajdek committed Sep 12, 2023
1 parent 2fa44dc commit 0451f2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/Growl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ const isReadyPromise = new Promise((resolve) => {
resolveIsReadyPromise = resolve;
});

function setIsReady(): void {
function setIsReady() {
if (!resolveIsReadyPromise) return;
resolveIsReadyPromise();
}

/**
* Show the growl notification
*/
function show(bodyText: string, type: string, duration: number = CONST.GROWL.DURATION): void {
function show(bodyText: string, type: string, duration: number = CONST.GROWL.DURATION) {
isReadyPromise.then(() => {
if (!growlRef?.current?.show) return;
growlRef.current.show(bodyText, type, duration);
Expand All @@ -29,14 +29,14 @@ function show(bodyText: string, type: string, duration: number = CONST.GROWL.DUR
/**
* Show error growl
*/
function error(bodyText: string, duration: number = CONST.GROWL.DURATION): void {
function error(bodyText: string, duration: number = CONST.GROWL.DURATION) {
show(bodyText, CONST.GROWL.ERROR, duration);
}

/**
* Show success growl
*/
function success(bodyText: string, duration: number = CONST.GROWL.DURATION): void {
function success(bodyText: string, duration: number = CONST.GROWL.DURATION) {
show(bodyText, CONST.GROWL.SUCCESS, duration);
}

Expand Down

0 comments on commit 0451f2f

Please sign in to comment.