This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type GetJournalArticlesQuery = { | |
__typename?: "Query" | undefined | |
entries: Array< | |
| { | |
__typename?: "test_default_Entry" | |
slug: string | |
title: string | |
uri: string | |
postDate: any | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MultidimensionalChart as Chart } from './components/MultidimensionalChart' | |
export default function ChartWithChildren() { | |
return ( | |
<div className="text-sky-900"> | |
<div className="container px-6 pt-10 pb-24 mx-auto"> | |
<div className="flex flex-col w-full max-w-xl mx-auto divide-y space-y-14"> | |
<Chart className="pt-10" showLabels showValues> | |
<Chart.Bar label="Albany Hospital"> | |
<Chart.BarSegment label="Albany Hospital mnisplaced 52 patients" value={52} color="#009FAE" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Synthesizing 10/10 solutions | |
======= | |
const CallRecorder = Machine({ | |
id: "callRecorder", | |
initial: "idle", | |
states: { | |
idle: { | |
on: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface FutureScore { | |
efficiencies: number | |
growth: number | |
sustainability: number | |
} | |
export interface Answer { | |
label: string | |
score: number | |
future?: FutureScore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const setAnswer = (key, fallback) => (context, { value = fallback }) => { | |
let answerField = context[key]; | |
if (Array.isArray(answerField) && typeof value === 'string') { | |
const index = answerField.indexOf(value); | |
if (index > -1) { | |
answerField.splice(index, 1); | |
} | |
else { | |
answerField.push(value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use SilverStripe\ORM\DataExtension; | |
class DocumentExtension extends DataExtension | |
{ | |
private static $db = [ | |
'Description' => 'HTMLText', | |
]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace WAIRC; | |
use SilverStripe\ORM\DataObject; | |
use SilverStripe\Forms\FieldList; | |
use SilverStripe\Forms\TextField; | |
use SilverStripe\Forms\HTMLEditor\HTMLEditorField; | |
use SilverStripe\Forms\TabSet; | |
use SilverStripe\Forms\TreeMultiselectField; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let's React! | |
## Phase 1 - Like this, do that | |
1. Make a new directory - `mkdir lets-react` | |
1. Open this directory in VS Code | |
1. Open a new terminal in VS Code | |
1. Initialise a new project: | |
``` | |
npm init -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { types } from 'mobx-state-tree' | |
interface ITimestamp { | |
nanoseconds: number | |
seconds: number | |
} | |
export const FirestoreTimestamp = types.custom<number, ITimestamp>({ | |
name: 'Timestamp', | |
fromSnapshot(value: number) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Head from 'next/head' | |
import React from 'react' | |
import SbEditable from 'storyblok-react' | |
import { colors, Theme } from '../../styles' | |
import Kats from '../Icons/Kats' | |
import { DetailsContent } from './Details' | |
interface MapContent { | |
api_key: string | |
map_style: string |
NewerOlder