Skip to content

Commit 10a6c78

Browse files
authored
Merge pull request #277 from YousefED/add-demos-to-home
Add new demos to homepage
2 parents 867ae1b + 2f3493f commit 10a6c78

File tree

6 files changed

+21
-15
lines changed

6 files changed

+21
-15
lines changed

packages/editor/src/app/main/components/startscreen/StartScreen.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import intro from "./assets/intro.gif";
88
import lightning from "./assets/lightning.svg";
99
import globe from "./assets/globe.svg";
1010
import npm from "./assets/npm.svg";
11-
import previewImage from "./assets/notebook_preview.jpg";
11+
import timePreviewImage from "./assets/time_preview.jpg";
12+
import chartsPreviewImage from "./assets/charts_preview.jpg";
13+
import apiPreviewImage from "./assets/api_preview.jpg";
1214

1315
export const StartScreen = observer(() => {
1416
const { navigationStore, sessionStore } = getStoreService();
@@ -137,41 +139,41 @@ export const StartScreen = observer(() => {
137139
<div className={styles.overview + " row"}>
138140
<div className={styles.notebook}>
139141
<NotebookOverviewItem
140-
title="Import & transform CSV"
141-
description="See if we can import and manipulate some data"
142-
previewImage={previewImage}
142+
title="It’s all about timing"
143+
description="Explore TypeCell's reactivity with the help of time"
144+
previewImage={timePreviewImage}
143145
author={{
144146
username: "niklas",
145147
profileImageUrl: "",
146148
}}
147149
onClick={() => {
148-
alert("todo");
150+
navigationStore.navigateToNotebook("@niklas/time");
149151
}}></NotebookOverviewItem>
150152
</div>
151153
<div className={styles.notebook}>
152154
<NotebookOverviewItem
153-
title="3D prototype. Work with new models and cameras"
154-
description="Load a 3D model with adjustable camera interface"
155-
previewImage={previewImage}
155+
title="Fun with charts"
156+
description="Visualize weather data with two React chart libraries"
157+
previewImage={chartsPreviewImage}
156158
author={{
157159
username: "yousef",
158160
profileImageUrl: "",
159161
}}
160162
onClick={() => {
161-
alert("todo");
163+
navigationStore.navigateToNotebook("@yousef/charts");
162164
}}></NotebookOverviewItem>
163165
</div>
164166
<div className={styles.notebook}>
165167
<NotebookOverviewItem
166-
title="Use React graphs"
167-
description="Use React graph library to display various bar charts"
168-
previewImage={previewImage}
168+
title="File upload using API"
169+
description="Connect a React file uploader with an API"
170+
previewImage={apiPreviewImage}
169171
author={{
170-
username: "pieter",
172+
username: "niklas",
171173
profileImageUrl: "",
172174
}}
173175
onClick={() => {
174-
alert("todo");
176+
navigationStore.navigateToNotebook("@niklas/api");
175177
}}></NotebookOverviewItem>
176178
</div>
177179
</div>
78.1 KB
Loading
63.3 KB
Loading
Binary file not shown.
74 KB
Loading

packages/editor/src/store/local/navigationStore.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ export class NavigationStore {
210210
};
211211

212212
navigateToNewGuestNotebook = () => {
213-
this.navigateToIdentifier(parseIdentifier("@typecell/new"));
213+
this.navigateToNotebook("@typecell/new");
214+
};
215+
216+
navigateToNotebook = (identifier: string) => {
217+
this.navigateToIdentifier(parseIdentifier(identifier));
214218
};
215219

216220
showProfilePage = (owner: string) => {

0 commit comments

Comments
 (0)