aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers/handlebars/avatarHelper.js
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-03-17 09:10:48 +0100
committerGitHub <noreply@github.com>2017-03-17 09:10:48 +0100
commitde4365079bad2df3bdee2133576dc913ffbf1ab2 (patch)
treea522ccb952f0d37f454e8188e13b3dec3f731912 /server/sonar-web/src/main/js/helpers/handlebars/avatarHelper.js
parent6a03df65cc0c91a26150ea172a2c480e07326ea1 (diff)
downloadsonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.tar.gz
sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.zip
format code using prettier (#1774)
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/handlebars/avatarHelper.js')
-rw-r--r--server/sonar-web/src/main/js/helpers/handlebars/avatarHelper.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/helpers/handlebars/avatarHelper.js b/server/sonar-web/src/main/js/helpers/handlebars/avatarHelper.js
index b363867eb4b..67220a97d5a 100644
--- a/server/sonar-web/src/main/js/helpers/handlebars/avatarHelper.js
+++ b/server/sonar-web/src/main/js/helpers/handlebars/avatarHelper.js
@@ -20,7 +20,7 @@
import md5 from 'blueimp-md5';
import Handlebars from 'handlebars/runtime';
-function gravatarServer () {
+function gravatarServer() {
const getStore = require('../../app/utils/getStore').default;
const { getSettingValue } = require('../../store/rootReducer');
@@ -28,13 +28,11 @@ function gravatarServer () {
return (getSettingValue(store.getState(), 'sonar.lf.gravatarServerUrl') || {}).value;
}
-module.exports = function (email, size) {
+module.exports = function(email, size) {
// double the size for high pixel density screens
const emailHash = md5.md5((email || '').trim());
- const url = gravatarServer()
- .replace('{EMAIL_MD5}', emailHash)
- .replace('{SIZE}', size * 2);
+ const url = gravatarServer().replace('{EMAIL_MD5}', emailHash).replace('{SIZE}', size * 2);
return new Handlebars.default.SafeString(
- `<img class="rounded" src="${url}" width="${size}" height="${size}" alt="${email}">`
+ `<img class="rounded" src="${url}" width="${size}" height="${size}" alt="${email}">`
);
};