From c3f9bf3ff73e6ae906023768cff3d550b7cef803 Mon Sep 17 00:00:00 2001 From: Joao Victor Date: Tue, 26 Apr 2022 18:18:44 -0300 Subject: [PATCH] fix(Dashboard): changes required by linter --- bbb-learning-dashboard/src/App.js | 8 +++++-- .../src/components/Card.jsx | 7 +++++- .../src/components/StatusTable.jsx | 24 +++++++++++++++---- .../src/components/UserDetails/component.jsx | 6 +++-- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/bbb-learning-dashboard/src/App.js b/bbb-learning-dashboard/src/App.js index b9edd9c4f3..8115105ea6 100644 --- a/bbb-learning-dashboard/src/App.js +++ b/bbb-learning-dashboard/src/App.js @@ -87,14 +87,18 @@ class App extends React.Component { const cDecoded = decodeURIComponent(document.cookie); const cArr = cDecoded.split('; '); cArr.forEach((val) => { - if (val.indexOf(`${cookieName}=`) === 0) learningDashboardAccessToken = val.substring((`${cookieName}=`).length); + if (val.indexOf(`${cookieName}=`) === 0) { + learningDashboardAccessToken = val.substring((`${cookieName}=`).length); + } }); // Extend AccessToken lifetime by 7d (in each access) if (learningDashboardAccessToken !== '') { const cookieExpiresDate = new Date(); cookieExpiresDate.setTime(cookieExpiresDate.getTime() + (3600000 * 24 * 7)); - document.cookie = `ld-${meetingId}=${learningDashboardAccessToken}; expires=${cookieExpiresDate.toGMTString()}; path=/;SameSite=None;Secure`; + document.cookie = `ld-${meetingId}=${learningDashboardAccessToken}; \ + expires=${cookieExpiresDate.toGMTString()}; \ + path=/;SameSite=None;Secure`; } } diff --git a/bbb-learning-dashboard/src/components/Card.jsx b/bbb-learning-dashboard/src/components/Card.jsx index b0e985e24c..b70ffe3c2e 100644 --- a/bbb-learning-dashboard/src/components/Card.jsx +++ b/bbb-learning-dashboard/src/components/Card.jsx @@ -34,7 +34,12 @@ function Card(props) { } return ( -
+

{ number } diff --git a/bbb-learning-dashboard/src/components/StatusTable.jsx b/bbb-learning-dashboard/src/components/StatusTable.jsx index b8d501ae48..e1057880e0 100644 --- a/bbb-learning-dashboard/src/components/StatusTable.jsx +++ b/bbb-learning-dashboard/src/components/StatusTable.jsx @@ -147,13 +147,21 @@ class StatusTable extends React.Component { aria-label={tsToHHmmss(start - periods[0].start)} > {intl.formatMessage({ - +

); }) } diff --git a/bbb-learning-dashboard/src/components/UserDetails/component.jsx b/bbb-learning-dashboard/src/components/UserDetails/component.jsx index f8dffc78c0..ce6cf3b8d1 100644 --- a/bbb-learning-dashboard/src/components/UserDetails/component.jsx +++ b/bbb-learning-dashboard/src/components/UserDetails/component.jsx @@ -211,11 +211,13 @@ const UserDatailsComponent = (props) => {
{ mostCommonAnswer - ? `${String.fromCharCode(mostCommonAnswer.charCodeAt(0) - 32)}${mostCommonAnswer.substring(1)}` + ? `${String.fromCharCode(mostCommonAnswer.charCodeAt(0) - 32)}\ + ${mostCommonAnswer.substring(1)}` : intl.formatMessage({ id: 'app.learningDashboard.usersTable.notAvailable', defaultMessage: 'N/A',