File tree Expand file tree Collapse file tree 2 files changed +11
-19
lines changed
pages/common/Modals/LiveSessionVersionMismatch Expand file tree Collapse file tree 2 files changed +11
-19
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { inject } from 'mobx-react' ;
33
4- import VERSION , { getTimestamp } from 'common/version' ;
5-
64import { Container , Heading , Explanation } from '../elements' ;
75
8- function LiveVersionMismatch ( { store } ) {
9- const newer =
10- getTimestamp ( store . live . roomInfo . version ) > getTimestamp ( VERSION ) ;
11-
6+ function LiveVersionMismatch ( ) {
127 return (
138 < Container >
149 < Heading > Version Mismatch</ Heading >
1510 < Explanation >
16- The owner of this session has a{ newer ? ' newer' : 'n older' } version of
17- CodeSandbox.
18- { newer
19- ? ' Refresh to get the latest version.'
20- : ' Ask the owner to refresh to get the latest version.' }
11+ You are running an older version of CodeSandbox. Refresh to get the
12+ latest version.
2113 < p >
22- If refreshing doesn{ "'" } t work, you can try to clear your storage and
23- unregister the service worker.
14+ If refreshing doesn
15+ { "'" } t work, you can try to clear your storage and unregister the
16+ service worker.
2417 </ p >
2518 </ Explanation >
2619 </ Container >
Original file line number Diff line number Diff line change @@ -13,12 +13,11 @@ import { initializeLive as commonInitializeLive } from './common-sequences';
1313export const initializeLive = [
1414 commonInitializeLive ,
1515
16- // TODO: Add version back
17- // when(state`live.roomInfo.version`, v => v !== VERSION),
18- // {
19- // true: [set(props`modal`, 'liveVersionMismatch'), openModal],
20- // false: [],
21- // },
16+ when ( state `updateStatus` , s => s === 'available' ) ,
17+ {
18+ true : [ set ( props `modal` , 'liveVersionMismatch' ) , openModal ] ,
19+ false : [ ] ,
20+ } ,
2221
2322 setSandbox ,
2423 set ( state `live.isLoading` , false ) ,
You can’t perform that action at this time.
0 commit comments