Skip to content

Commit

Permalink
Reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
qti3e committed May 21, 2018
1 parent 2d5018d commit 49b82c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function bind<P>(C: ComponentConstructor<P, {}>, bindProps: BindProps<P>) {
}

// An anonymous notebook doc for when users aren't logged in
const anonDoc = {
export const anonDoc = {
anonymous: true,
cells: [],
created: new Date(),
Expand Down
11 changes: 2 additions & 9 deletions src/nb_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { h, render, rerender } from "preact";
import { testBrowser } from "../tools/tester";
import { NotebookPage, ProfilePage } from "./app";
import { anonDoc, NotebookPage, ProfilePage } from "./app";
import { cellExecuteQueue } from "./components/cell";
import { Notebook } from "./components/notebook";
import * as db from "./db";
Expand Down Expand Up @@ -218,16 +218,9 @@ async function renderNotebook(): Promise<Notebook> {
let notebook: Notebook;
const nb = h(Notebook as any, {
initialDoc: {
anonymous: true,
...anonDoc,
cells: ["let a = 4", "let b = 5"],
created: new Date(),
owner: {
displayName: "Anonymous",
photoURL: require("./img/anon_profile.png"),
uid: ""
},
title: DOC_TITLE,
updated: new Date()
},
ref: ref => (notebook = ref)
});
Expand Down

0 comments on commit 49b82c8

Please sign in to comment.