Skip to content

Instantly share code, notes, and snippets.

View robertpenner's full-sized avatar

Robert Penner robertpenner

View GitHub Profile
@robertpenner
robertpenner / machine.js
Created September 17, 2021 18:42
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Main Navigation - Deep",
meta: { description: "5 pages with dedicated buttons" },
initial: "YourTOUR",
states: {
YourTOUR: {},
Discover: {
initial: "News",
states: {
@robertpenner
robertpenner / machine.js
Last active August 16, 2021 19:28
Generated by XState Viz: https://xstate.js.org/viz
var TournamentStatus;
(function (TournamentStatus) {
TournamentStatus["INACTIVE"] = "Inactive";
TournamentStatus["SCHEDULED"] = "Scheduled";
TournamentStatus["GROUPINGS_OFFICIAL"] = "Groupings Official";
TournamentStatus["IN_PROGRESS"] = "In Progress";
TournamentStatus["IN_PLAYOFF"] = "In Playoff";
TournamentStatus["DELAY"] = "Delay";
TournamentStatus["FINAL"] = "Final";
TournamentStatus["ARCHIVED"] = "Archived";
@robertpenner
robertpenner / machine.js
Created August 12, 2021 22:08
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Odds Navigation",
initial: "Unavailable",
states: {
Unavailable: {},
"To Win": {},
Matchups: {
initial: "3 Ball – DHR – R1",
states: {
"3 Ball – DHR – R1": {},
@robertpenner
robertpenner / machine.js
Last active August 12, 2021 22:06
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Main Navigation - Top 2 Levels",
meta: { description: "5 pages with dedicated buttons" },
initial: "YourTOUR",
states: {
YourTOUR: {},
Discover: {
initial: "News",
states: {
News: {},
@robertpenner
robertpenner / machine.js
Last active August 12, 2021 22:10
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Leaderboard Navigation - Top 2 Levels",
initial: "Leaderboard",
states: {
Leaderboard: {
type: "parallel",
states: {
"[A Pro Tournament]": {},
"[A Pro-Am Tournament]": {
initial: "Pro",
@robertpenner
robertpenner / machine.js
Last active August 12, 2021 22:11
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Main Navigation - Deep",
meta: { description: "5 pages with dedicated buttons" },
initial: "YourTOUR",
states: {
YourTOUR: {},
Discover: {
initial: "News",
states: {
News: {},
@robertpenner
robertpenner / machine.js
Last active August 10, 2021 21:52
Generated by XState Viz: https://xstate.js.org/viz
/*
TODO:
- LIVE status
- Pre and Post statuses
x delay notice (in context)
x switch category, e.g. Pro-Am
x loading data
x update data
x change sort direction
x change sort column
@robertpenner
robertpenner / machine.js
Last active August 9, 2021 19:35
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'Distracted Meme',
type: 'parallel',
states: {
boyfriend: {
initial: 'listening',
states: {
listening: {
on: {
'SEES RED DRESS': 'distracted'
@robertpenner
robertpenner / machine.js
Last active August 9, 2021 19:06
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'DRAKE',
initial: 'displeased',
states: {
displeased: {
on: {
'SEES BETTER OPTION': 'pleased'
},
},
pleased: {},
@robertpenner
robertpenner / machine.js
Last active August 9, 2021 22:05
Generated by XState Viz: https://xstate.js.org/viz
const randomRange = (min, max) =>
min + Math.random() * (max - min);
const machine = Machine(
{
id: "Round as Individual Player",
type: "parallel",
states: {
"Player 1": {
id: "P1",