Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Commit 13b1a9c

Browse files
author
Kerri Sim
committed
Replace Material Paper with Garden Well
1 parent 8eb58cf commit 13b1a9c

File tree

1 file changed

+16
-24
lines changed
  • app/javascript/pages/admin/Dashboard

1 file changed

+16
-24
lines changed

app/javascript/pages/admin/Dashboard/index.js

+16-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useContext } from 'react'
22
import * as R from 'ramda'
33
import moment from 'moment'
4-
import Paper from 'material-ui/Paper'
4+
import { Well } from '@zendeskgarden/react-notifications'
55
import { useQuery } from '@apollo/react-hooks'
66

77
import Loading from 'components/LoadingIcon'
@@ -16,25 +16,17 @@ import AttendanceQuery from './attendanceQuery.gql'
1616

1717
import { withTranslation } from 'react-i18next'
1818

19-
const startOfWeek = moment()
20-
.startOf('week')
21-
.unix()
19+
const startOfWeek = moment().startOf('week').unix()
2220

23-
const startOfMonth = moment()
24-
.startOf('month')
25-
.unix()
21+
const startOfMonth = moment().startOf('month').unix()
2622

27-
const endOfWeek = moment()
28-
.endOf('week')
29-
.unix()
23+
const endOfWeek = moment().endOf('week').unix()
3024

31-
const endOfMonth = moment()
32-
.endOf('month')
33-
.unix()
25+
const endOfMonth = moment().endOf('month').unix()
3426

3527
// Only declare styles in here that are needed for MUI components
3628
const styles = {
37-
paper: {
29+
well: {
3830
width: '100%',
3931
height: '100%',
4032
padding: 20,
@@ -109,7 +101,7 @@ const Dashboard = ({ t }) => {
109101
</div>
110102
<div className={s.row}>
111103
<div className={s.column}>
112-
<Paper style={styles.paper} rounded={false}>
104+
<Well style={styles.well}>
113105
{eventsThisWeek.length === 0 ? (
114106
<h3>{t('volunteer_portal.admin.tab.dashboard_noeventsthisweek')}</h3>
115107
) : (
@@ -139,10 +131,10 @@ const Dashboard = ({ t }) => {
139131
</div>
140132
</div>
141133
)}
142-
</Paper>
134+
</Well>
143135
</div>
144136
<div className={s.column}>
145-
<Paper style={styles.paper} rounded={false}>
137+
<Well style={styles.well}>
146138
{eventsThisMonth.length === 0 ? (
147139
<h3>{t('volunteer_portal.admin.tab.dashboard_noeventsthismonth')}</h3>
148140
) : (
@@ -172,27 +164,27 @@ const Dashboard = ({ t }) => {
172164
</div>
173165
</div>
174166
)}
175-
</Paper>
167+
</Well>
176168
</div>
177169
</div>
178170
<div className={s.rowSpace} />
179171
<div className={s.row}>
180172
<div className={s.column}>
181173
{eventsThisWeek.length === 0 ? null : (
182-
<Paper style={styles.paper} rounded={false}>
183-
{R.take(10, eventsThisWeek).map(e => (
174+
<Well style={styles.well}>
175+
{R.take(10, eventsThisWeek).map((e) => (
184176
<Event key={`week-event-${e.id}`} event={e} addPopover={false} isLink />
185177
))}
186-
</Paper>
178+
</Well>
187179
)}
188180
</div>
189181
<div className={s.column}>
190182
{eventsThisMonth.length === 0 ? null : (
191-
<Paper style={styles.paper} rounded={false}>
192-
{R.take(10, eventsThisMonth).map(e => (
183+
<Well style={styles.well}>
184+
{R.take(10, eventsThisMonth).map((e) => (
193185
<Event key={`month-event-${e.id}`} event={e} addPopover={false} isLink />
194186
))}
195-
</Paper>
187+
</Well>
196188
)}
197189
</div>
198190
</div>

0 commit comments

Comments
 (0)