Skip to content

Commit d5e04c1

Browse files
authored
dashboard: add projects banner (codesandbox#6813)
1 parent 1659ce6 commit d5e04c1

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

packages/app/src/app/pages/Dashboard/Content/routes/Home/index.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import React, { useEffect } from 'react';
22
import { useAppState, useActions } from 'app/overmind';
33
import { sandboxesTypes } from 'app/overmind/namespaces/dashboard/types';
44
import { Header } from 'app/pages/Dashboard/Components/Header';
5-
import { VariableGrid } from 'app/pages/Dashboard/Components/VariableGrid';
5+
import {
6+
VariableGrid,
7+
GUTTER,
8+
} from 'app/pages/Dashboard/Components/VariableGrid';
69
import { SelectionProvider } from 'app/pages/Dashboard/Components/Selection';
710
import { dashboard as dashboardUrls } from '@codesandbox/common/lib/utils/url-generator';
811
import { Helmet } from 'react-helmet';
@@ -11,6 +14,19 @@ import {
1114
DashboardTemplate,
1215
PageTypes,
1316
} from 'app/pages/Dashboard/types';
17+
import styled from 'styled-components';
18+
19+
const BannerProjects = styled.a`
20+
display: block;
21+
22+
width: calc(100% - ${2 * GUTTER}px);
23+
max-width: GRID_MAX_WIDTH - 2 * GUTTER;
24+
margin: 0 auto ${GUTTER}px;
25+
26+
img {
27+
width: 100%;
28+
}
29+
`;
1430

1531
export const Home = () => {
1632
const {
@@ -84,6 +100,12 @@ export const Home = () => {
84100
<Helmet>
85101
<title>Dashboard - CodeSandbox</title>
86102
</Helmet>
103+
<BannerProjects href="https://codesandbox.io/p/dashboard">
104+
<img
105+
src="/static/img/projects-banner.png"
106+
alt="The CodeSandbox flow, for any project of any size. Try now"
107+
/>
108+
</BannerProjects>
87109
<Header title="Home" activeTeam={activeTeam} showViewOptions />
88110
<VariableGrid page={pageType} items={items} />
89111
</SelectionProvider>
127 KB
Loading

0 commit comments

Comments
 (0)