Skip to content
Snippets Groups Projects
Commit 6e301073 authored by Sreeram, Sudarshan's avatar Sreeram, Sudarshan :carrot:
Browse files

Change right sidebar date formatting

Note: Daniel, I know you're going to hate this. Sorry!
parent 6bae16a7
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ class RightBar extends React.Component<{}, RightBarState> {
this.timerID = window.setInterval(
() =>
this.setState({
date: new Date(),
date: new Date()
}),
1000
);
......@@ -33,20 +33,29 @@ class RightBar extends React.Component<{}, RightBarState> {
let buttons = [
{
title: "Settings",
icon: faCog,
icon: faCog
},
{
title: "Sign Out",
icon: faSignOutAlt,
},
icon: faSignOutAlt
}
];
let timeOptions = { timeZone: "Europe/London", hourCycle: "h23" };
let timeOptions = {
timeZone: "Europe/London",
dateStyle: "long",
hourCycle: "h23",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
weekday: "short",
day: "2-digit",
month: "short"
};
return (
<div id={styles.rightbarWrapper}>
<p className={styles.rightbarStatus}>
{/* yyyy-MM-dd HH:mm:ss, we have the duty to promote the spread of ISO8601 */}
{this.state.date.toLocaleString("en-CA", timeOptions)}
{this.state.date.toLocaleString("en-GB", timeOptions)}
</p>
<CalendarGroup />
<SideBarTabGroup title="Account" buttons={buttons} />
......
......@@ -65,6 +65,7 @@
letter-spacing: 0;
position: relative;
width: max-content;
text-transform: uppercase;
}
#rightbarWrapper {
......
......@@ -36,6 +36,7 @@ const StandardView: React.FC<StandardViewProps> = ({
toggledRight: toggledRight,
})}
>
<RightBar />
<Switch>
<Route path="/modules/:id">
<LeftBarModule />
......@@ -50,7 +51,6 @@ const StandardView: React.FC<StandardViewProps> = ({
</Route>
</Switch>
<RightBar />
<div id="sidenav-overlay" onClick={(e) => onOverlayClick(e)}></div>
<Switch>
......
......@@ -5,6 +5,7 @@
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
z-index: 5050;
}
#sidenav-overlay {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment