1
1
import React , { useContext } from 'react'
2
2
import * as R from 'ramda'
3
3
import moment from 'moment'
4
- import Paper from 'material-ui/Paper '
4
+ import { Well } from '@zendeskgarden/react-notifications '
5
5
import { useQuery } from '@apollo/react-hooks'
6
6
7
7
import Loading from 'components/LoadingIcon'
@@ -16,25 +16,17 @@ import AttendanceQuery from './attendanceQuery.gql'
16
16
17
17
import { withTranslation } from 'react-i18next'
18
18
19
- const startOfWeek = moment ( )
20
- . startOf ( 'week' )
21
- . unix ( )
19
+ const startOfWeek = moment ( ) . startOf ( 'week' ) . unix ( )
22
20
23
- const startOfMonth = moment ( )
24
- . startOf ( 'month' )
25
- . unix ( )
21
+ const startOfMonth = moment ( ) . startOf ( 'month' ) . unix ( )
26
22
27
- const endOfWeek = moment ( )
28
- . endOf ( 'week' )
29
- . unix ( )
23
+ const endOfWeek = moment ( ) . endOf ( 'week' ) . unix ( )
30
24
31
- const endOfMonth = moment ( )
32
- . endOf ( 'month' )
33
- . unix ( )
25
+ const endOfMonth = moment ( ) . endOf ( 'month' ) . unix ( )
34
26
35
27
// Only declare styles in here that are needed for MUI components
36
28
const styles = {
37
- paper : {
29
+ well : {
38
30
width : '100%' ,
39
31
height : '100%' ,
40
32
padding : 20 ,
@@ -109,7 +101,7 @@ const Dashboard = ({ t }) => {
109
101
</ div >
110
102
< div className = { s . row } >
111
103
< div className = { s . column } >
112
- < Paper style = { styles . paper } rounded = { false } >
104
+ < Well style = { styles . well } >
113
105
{ eventsThisWeek . length === 0 ? (
114
106
< h3 > { t ( 'volunteer_portal.admin.tab.dashboard_noeventsthisweek' ) } </ h3 >
115
107
) : (
@@ -139,10 +131,10 @@ const Dashboard = ({ t }) => {
139
131
</ div >
140
132
</ div >
141
133
) }
142
- </ Paper >
134
+ </ Well >
143
135
</ div >
144
136
< div className = { s . column } >
145
- < Paper style = { styles . paper } rounded = { false } >
137
+ < Well style = { styles . well } >
146
138
{ eventsThisMonth . length === 0 ? (
147
139
< h3 > { t ( 'volunteer_portal.admin.tab.dashboard_noeventsthismonth' ) } </ h3 >
148
140
) : (
@@ -172,27 +164,27 @@ const Dashboard = ({ t }) => {
172
164
</ div >
173
165
</ div >
174
166
) }
175
- </ Paper >
167
+ </ Well >
176
168
</ div >
177
169
</ div >
178
170
< div className = { s . rowSpace } />
179
171
< div className = { s . row } >
180
172
< div className = { s . column } >
181
173
{ 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 ) => (
184
176
< Event key = { `week-event-${ e . id } ` } event = { e } addPopover = { false } isLink />
185
177
) ) }
186
- </ Paper >
178
+ </ Well >
187
179
) }
188
180
</ div >
189
181
< div className = { s . column } >
190
182
{ 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 ) => (
193
185
< Event key = { `month-event-${ e . id } ` } event = { e } addPopover = { false } isLink />
194
186
) ) }
195
- </ Paper >
187
+ </ Well >
196
188
) }
197
189
</ div >
198
190
</ div >
0 commit comments