File tree Expand file tree Collapse file tree 3 files changed +24
-20
lines changed
src/packages/next/components/landing Expand file tree Collapse file tree 3 files changed +24
-20
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import { Col , Row , Space } from "antd" ;
7
7
import { ReactNode } from "react" ;
8
-
9
8
import StaticMarkdown from "@cocalc/frontend/editors/slate/static-markdown" ;
10
9
import { COLORS } from "@cocalc/util/theme" ;
11
10
import Path from "components/app/path" ;
@@ -74,7 +73,7 @@ export default function Content(props: Props) {
74
73
title,
75
74
} = props ;
76
75
77
- const { sandboxProjectId } = useCustomize ( ) ;
76
+ const { account , sandboxProjectId } = useCustomize ( ) ;
78
77
79
78
function renderIndexInfo ( ) {
80
79
if ( ! imageAlternative ) return ;
@@ -218,13 +217,15 @@ export default function Content(props: Props) {
218
217
{ description }
219
218
</ Title >
220
219
) }
221
- < div style = { { marginTop : "15px" } } >
222
- < LiveDemo
223
- context = {
224
- typeof title == "string" ? title : alt ?? "Feature Page"
225
- }
226
- />
227
- </ div >
220
+ { account && (
221
+ < div style = { { marginTop : "15px" } } >
222
+ < LiveDemo
223
+ context = {
224
+ typeof title == "string" ? title : alt ?? "Feature Page"
225
+ }
226
+ />
227
+ </ div >
228
+ ) }
228
229
< SignIn startup = { startup ?? title } hideFree = { true } />
229
230
</ Space >
230
231
</ Col >
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export default function Footer() {
62
62
organizationURL,
63
63
enabledPages,
64
64
termsOfServiceURL,
65
+ account,
65
66
} = useCustomize ( ) ;
66
67
67
68
const footerColumns : Array < FooterColumn > = [
@@ -136,7 +137,7 @@ export default function Footer() {
136
137
{
137
138
text : "Get a Live Demo" ,
138
139
url : liveDemoUrl ( "footer" ) ,
139
- hide : ! enabledPages ?. support ,
140
+ hide : ! account || ! enabledPages ?. support ,
140
141
} ,
141
142
] ,
142
143
} ,
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ import basePath from "lib/base-path";
19
19
import { useCustomize } from "lib/customize" ;
20
20
import SubNav , { Page , SubPage } from "./sub-nav" ;
21
21
import LiveDemo from "components/landing/live-demo" ;
22
- // import { Button } from "antd";
23
- // import { Icon } from "@cocalc/frontend/components/icon";
22
+ import { Button } from "antd" ;
23
+ import { Icon } from "@cocalc/frontend/components/icon" ;
24
24
25
25
const GAP = "4%" ;
26
26
@@ -71,14 +71,16 @@ export default function Header(props: Props) {
71
71
width : "150px" , // CRITICAL -- this is to prevent flicker -- see https://github.com/sagemathinc/cocalc/issues/6504
72
72
} }
73
73
>
74
- < LiveDemo context = "header" />
75
- { /*<Button
76
- size="large"
77
- type="primary"
78
- href="/support/new?type=question&subject=&body=&title=Ask%20Us%20Anything!"
79
- >
80
- <Icon style={{ fontSize: "20px" }} name="question-circle" /> Contact
81
- </Button>*/ }
74
+ { account ? (
75
+ < LiveDemo context = "header" />
76
+ ) : (
77
+ < Button
78
+ type = "primary"
79
+ href = "/support/new?type=question& subject = & body = & title = Ask % 20 Us % 20 Anything ! "
80
+ >
81
+ < Icon name = "question-circle" /> Contact
82
+ </ Button >
83
+ ) }
82
84
</ span >
83
85
) ;
84
86
}
You can’t perform that action at this time.
0 commit comments