~cytrogen/masto-fe

cfc0da77ac7d5b6351938bfa1a6b77a11065fc7a — Michael Stanclift 2 years ago 19ebf77
[Glitch] Fix retention dashboard not displaying correct month

Port 7fddeca1907493fb327316c5447740922acb934f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
1 files changed, 3 insertions(+), 2 deletions(-)

M app/javascript/flavours/glitch/components/admin/Retention.jsx
M app/javascript/flavours/glitch/components/admin/Retention.jsx => app/javascript/flavours/glitch/components/admin/Retention.jsx +3 -2
@@ 9,11 9,12 @@ import api from 'flavours/glitch/api';
import { roundTo10 } from 'flavours/glitch/utils/numbers';

const dateForCohort = cohort => {
  const timeZone = 'UTC';
  switch(cohort.frequency) {
  case 'day':
    return <FormattedDate value={cohort.period} month='long' day='2-digit' />;
    return <FormattedDate value={cohort.period} month='long' day='2-digit' timeZone={timeZone} />;
  default:
    return <FormattedDate value={cohort.period} month='long' year='numeric' />;
    return <FormattedDate value={cohort.period} month='long' year='numeric' timeZone={timeZone} />;
  }
};