I hereby claim:
- I am ndreckshage on github.
- I am ndreckshage (https://keybase.io/ndreckshage) on keybase.
- I have a public key ASA21TRez_C6kCPWHrWwBe1gR1TDJZt52bpoq0cZiCGnaAo
To claim this, I am signing this object:
| import { useQuery, gql } from "ui/lib/use-data.client"; | |
| const Component = () => { | |
| const { data, hydrateClient } = useQuery<{ | |
| currentUser?: { | |
| lists: { | |
| id: string; | |
| key: string; | |
| title: string; | |
| }[]; |
| const result = await query(Let({ | |
| // get author document from index by key. assign authorDoc as variable | |
| authorDoc: Get(Match(Index("unique_authors_by_key"), "haruki-murakami")) | |
| }, Let({ | |
| // select book references from author document. assign bookRefs variable | |
| bookRefs: Select(["data", "bookRefs"], Var("authorDoc")) | |
| }, Let({}, { | |
| // start forming the return result here | |
| id: Select(["ref", "id"], Var("authorDoc")), | |
| authorName: Select(["data", "name"], Var('authorDoc')), |
| const COMPONENT_MAP = { | |
| LayoutComponent: Layout, | |
| CarouselComponent: Carousel, | |
| GridComponent: Grid, | |
| ListComponent: List, | |
| BookAuthorsComponent: BookAuthors, | |
| BookCategoriesComponent: BookCategories, | |
| BookDetailsComponent: BookDetails, | |
| BookImageComponent: BookImage, | |
| BookTitleComponent: BookTitle, |
| fragment MarkdownComponentFragment on MarkdownComponent { | |
| id | |
| text | |
| backgroundColor | |
| } | |
| fragment LayoutComponentFragment on LayoutComponent { | |
| id | |
| layoutCreatedBy: createdBy | |
| flexDirection |
| import Layout from "ui/components/system/layout.server"; | |
| export default function HomePage() { | |
| return <Layout id="319284825818136644" />; | |
| } |
| type LayoutComponent { | |
| id: ID! | |
| title: String! | |
| createdBy: String! | |
| flexDirection: String! | |
| container: Boolean! | |
| components: [Component!]! | |
| } | |
| union Component = |
I hereby claim:
To claim this, I am signing this object:
| // even though the dangerous auth is fine on client | |
| var cu = require('dangerous-auth').get(); | |
| // need to instead shim a context to maintain same api | |
| // to resolve routes etc, sometime need access to context | |
| // var context = {}; |
| (-> | |
| Ember = require 'ember' | |
| moment = require 'moment' | |
| # Socket.io | |
| io = window.io | |
| host = location.origin.replace /^http/, 'ws' | |
| socket = io.connect host | |
| # SnapSecret |
| window.SnapSecret.ApplicationController = Ember.Controller.extend | |
| countdownWarning: false | |
| countdown: 60 | |
| stats: | |
| totalRead: if !!window.secretStats and !!window.secretStats.totalRead then window.secretStats.totalRead else null | |
| totalSpilled: if !!window.secretStats and !!window.secretStats.totalSpilled then window.secretStats.totalSpilled else null | |
| warnAtTen: (() -> | |
| if @countdown == 10 | |
| @set 'countdownWarning', true | |
| else if @countdown > 10 |