@@ -17,60 +17,17 @@ const Project = ({ edition, project }) => {
17
17
const determineBreakoutState = ( ) => {
18
18
// if (!isDemoDay) return null;
19
19
if ( true ) return null ;
20
- const now = Date . now ( ) ;
21
- const start = new Date ( project . breakout . startsAt ) ;
22
- const end = new Date ( project . breakout . endsAt ) ;
23
- if ( now <= start ) return BREAKOUT_UNSTARTED ;
24
- if ( now < end && now > start ) return BREAKOUT_IN_PROGRESS ;
25
- if ( now >= end ) return BREAKOUT_ENDED ;
26
- return null ;
27
20
} ;
28
21
29
22
const [ breakoutStatus , setBreakoutStatus ] = useState ( determineBreakoutState ( ) ) ;
30
23
31
24
useEffect ( ( ) => {
32
25
let interval = ( ) => { } ;
33
- if ( false ) {
34
- // if (isDemoDay) {
35
- interval = setInterval ( ( ) => {
36
- const b = determineBreakoutState ( ) ;
37
- if ( b !== breakoutStatus ) setBreakoutStatus ( b ) ;
38
- } , 10000 ) ;
39
- }
40
26
return ( ) => clearInterval ( interval ) ;
41
27
} , [ ] ) ;
42
28
43
29
let $buttonContent ;
44
30
let buttonDisabled = true ;
45
- if ( false ) {
46
- // if (isDemoDay) {
47
- if ( breakoutStatus === BREAKOUT_UNSTARTED ) {
48
- const start = new Date ( project . breakout . startsAt ) ;
49
- const hours = start . getHours ( ) ;
50
- const minutes = start . getMinutes ( ) ;
51
- $buttonContent = (
52
- < >
53
- < img className = "c-icon" src = "/img/icons/time.svg" alt = "clock" />
54
- Meet us at { hours } :{ minutes === 0 ? '00' : minutes }
55
- </ >
56
- ) ;
57
- } else if ( breakoutStatus === BREAKOUT_IN_PROGRESS ) {
58
- $buttonContent = (
59
- < >
60
- < img className = "c-icon" src = "/img/icons/video.svg" alt = "video" />
61
- Meet the team
62
- </ >
63
- ) ;
64
- buttonDisabled = false ;
65
- } else if ( breakoutStatus === BREAKOUT_ENDED ) {
66
- $buttonContent = (
67
- < >
68
- < img className = "c-icon" src = "/img/icons/time.svg" alt = "clock" />
69
- Session has ended
70
- </ >
71
- ) ;
72
- }
73
- }
74
31
75
32
return (
76
33
// ${isDemoDay ? 'on-demo-day' : ''}
0 commit comments