-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change headline * Adjust content and alignment * Fix bug on summary
- Loading branch information
1 parent
a44c53c
commit a903049
Showing
3 changed files
with
56 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const getScoreHeadline = (score: number) => { | ||
if (score > 80) { | ||
return { | ||
headline: "You deserve a round of API-lause!", | ||
sub: "But don't REST on your laurels", | ||
}; | ||
} | ||
|
||
if (score > 60) { | ||
return { | ||
headline: "You're on the right track", | ||
sub: "Here's some tips to make your endpoints more API-ling", | ||
}; | ||
} | ||
|
||
if (score > 40) { | ||
return { | ||
headline: "We API-reciate the effort", | ||
sub: "But you're not quite there yet", | ||
}; | ||
} | ||
|
||
return { | ||
headline: "You have some work to do", | ||
sub: "REST assured, we can help!", | ||
}; | ||
}; | ||
|
||
export default getScoreHeadline; |