File tree Expand file tree Collapse file tree 3 files changed +33
-25
lines changed
packages/app/src/app/pages/common/Modals/LiveSessionEnded Expand file tree Collapse file tree 3 files changed +33
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import styled , { css } from 'styled-components' ;
2+
3+ import { Explanation as ExplanationBase } from '../elements' ;
4+
5+ export const Container = styled . div `
6+ ${ ( { theme } ) => css `
7+ background-color: ${ theme . background } ;
8+ padding: 1rem;
9+ margin: 0;
10+ color: rgba(255, 255, 255, 0.8);
11+ ` } ;
12+ ` ;
13+
14+ export const Explanation = styled ( ExplanationBase ) `
15+ margin-bottom: 1rem;
16+ ` ;
Original file line number Diff line number Diff line change 11import { Button } from '@codesandbox/common/lib/components/Button' ;
22import Row from '@codesandbox/common/lib/components/flex/Row' ;
3- import { useOvermind } from 'app/overmind' ;
43import React , { FunctionComponent } from 'react' ;
5- import { Explanation , Heading } from '../elements' ;
6- import { Container } from './elements' ;
4+
5+ import { useOvermind } from 'app/overmind' ;
6+
7+ import { Heading } from '../elements' ;
8+
9+ import { Container , Explanation } from './elements' ;
710
811export const LiveSessionEnded : FunctionComponent = ( ) => {
912 const {
13+ actions : {
14+ editor : { forkSandboxClicked } ,
15+ modalClosed,
16+ } ,
1017 state : {
18+ currentModalMessage,
1119 editor : {
1220 currentSandbox : { owned } ,
1321 } ,
14- currentModalMessage,
15- } ,
16- actions : {
17- modalClosed,
18- editor : { forkSandboxClicked } ,
1922 } ,
2023 } = useOvermind ( ) ;
2124
@@ -26,32 +29,29 @@ export const LiveSessionEnded: FunctionComponent = () => {
2629 return (
2730 < Container >
2831 < Heading > The live session has ended</ Heading >
29- < Explanation style = { { marginBottom : '1rem' } } >
32+
33+ < Explanation >
3034 { currentModalMessage || 'The session has ended due to inactivity' } ,{ ' ' }
3135 { suggestion }
3236 </ Explanation >
3337
3438 < Row justifyContent = "space-around" >
35- < Button small href = "/s" >
39+ < Button href = "/s" small >
3640 Create Sandbox
3741 </ Button >
3842
3943 { owned ? (
40- < Button
41- small
42- onClick = { ( ) => {
43- modalClosed ( ) ;
44- } }
45- >
44+ < Button onClick = { ( ) => modalClosed ( ) } small >
4645 Close Modal
4746 </ Button >
4847 ) : (
4948 < Button
50- small
5149 onClick = { ( ) => {
5250 forkSandboxClicked ( ) ;
51+
5352 modalClosed ( ) ;
5453 } }
54+ small
5555 >
5656 Fork Sandbox
5757 </ Button >
You can’t perform that action at this time.
0 commit comments