This file contains 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
name: PlanetScale Migration | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- packages/shared/db/schema.prisma | |
env: | |
PLANETSCALE_ORG: your-ps-org | |
PLANETSCALE_DB: your-db-name |
This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Example to show inconsistencies in Spot Panel ports"> | |
<title>Example of Spot Panel Ports</title> | |
<meta charset="UTF-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gojs/2.1.9/go.js"></script> | |
<script id="code"> | |
function init() { | |
const $ = go.GraphObject.make; |
This file contains 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
header.navbar { | |
height: 40px; | |
margin: 5px 20px; | |
} | |
div.menu .menu-item.tile.tile-centered { | |
margin-top: 5px; | |
} | |
.menu.hero-list { |
This file contains 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 { HEROES, COMICS } from './data'; | |
// the Knuth shuffle algorithm | |
export function shuffle(array) { | |
let currentIndex = array.length; | |
let temporaryValue; | |
let randomIndex; | |
// While there remain elements to shuffle... | |
while (0 !== currentIndex) { |
This file contains 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 React from 'react'; | |
import { DragDropContext } from 'react-beautiful-dnd'; | |
import { HEROES, COMICS } from './custom/data'; | |
import { shuffle, getTimeLeft, move, GAME_STATE } from './custom/utils'; | |
import Modal from './components/Modal'; | |
import Header from './components/Header'; | |
import Dropzone from './components/Dropzone'; | |
import Footer from './components/Footer'; |
This file contains 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
/** App.js **/ | |
import React from 'react'; | |
import { DragDropContext } from 'react-beautiful-dnd'; | |
import { HEROES, COMICS } from './custom/data'; | |
import { shuffle, move, GAME_STATE } from './custom/utils'; | |
import Modal from './components/Modal'; | |
import Header from './components/Header'; |
This file contains 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
/** components/Dropzone.js **/ | |
import React from 'react'; | |
import { Droppable, Draggable } from 'react-beautiful-dnd'; | |
const Dropzone = ({ isDropDisabled, heroes, id }) => ( | |
<div className="column col-4"> | |
<div className="divider" data-content={id.toUpperCase()} /> | |
<Droppable droppableId={id} isDropDisabled={isDropDisabled}> | |
{provided => { |
This file contains 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
class App extends React.Component { | |
render() { | |
const { gameState, timeLeft, bench, ...groups } = this.state; | |
const isDropDisabled = gameState === GAME_STATE.DONE; | |
return ( | |
<> | |
<Header gameState={gameState} timeLeft={timeLeft} endGame={this.endGame} /> | |
{this.state.gameState !== GAME_STATE.PLAYING && ( | |
<Modal |
NewerOlder