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 initialState = { | |
| // The current state of the battle | |
| currentState: 'SELECT_MOVE', | |
| // The active Pokemon on each side | |
| activePokemon: [null, null], | |
| // The remaining health of each Pokemon | |
| health: [0, 0], | |
| // The moves available to each Pokemon | |
| moves: [[], []], | |
| // The current move being used by each Pokemon |
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
| open Belt; | |
| [@bs.deriving abstract] | |
| type queryConfig('data, 'key, 'fnParamsFilter) = { | |
| [@bs.optional] | |
| retry: int, | |
| [@bs.optional] | |
| retryDelay: int, | |
| [@bs.optional] | |
| initialData: unit => 'data, |
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
| /** | |
| * 1. Make sure "glob" is installed globally | |
| * 2. Update src path if necessary | |
| * 3. Run `node res_of_re.js` | |
| */ | |
| let glob = require("glob"); | |
| let { exec } = require("child_process"); | |
| glob("src/**/*.re", (err, files) => { |
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
| /** | |
| * Dependencies: | |
| * - Utils | |
| * - bs-css | |
| * - react-spring (and bindings: bs-react-spring) | |
| * - react-use-memo (and bindings: custom) | |
| * - Close Icon | |
| * - Loader/Spinner | |
| */ | |
| open Utils; |
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
| // Component: https://github.com/airbnb/react-outside-click-handler | |
| [@bs.module "react-outside-click-handler"] [@react.component] | |
| external make: | |
| ( | |
| ~onOutsideClick: unit => unit, | |
| ~children: React.element, | |
| ~disabled: bool=?, | |
| ~useCapture: bool=?, | |
| ~display: [@bs.string] [ |
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
| open Utils; | |
| type align = [ | `right | `left]; | |
| module Style = { | |
| open Css; | |
| let root = | |
| style([ | |
| zIndex(50), |
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
| [@bs.val] [@bs.return nullable] [@bs.scope "document"] | |
| external getElementById: string => option(Dom.element) = "getElementById"; | |
| [@bs.val] | |
| external appendChild: Dom.element => Dom.element = "document.body.appendChild"; | |
| [@bs.val] | |
| external removeChild: Dom.element => Dom.element = "document.body.removeChild"; | |
| [@bs.val] [@bs.scope "document"] |
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
| open Belt; | |
| /** | |
| * Currently only setup for use with Bold's Recurring Orders | |
| * SETUP: | |
| * ALL: SET VARIABLES IN LIQUID (within <script>) | |
| * window.boldGroupId = "{{product.variants[0].metafields.bold_rp.rp_group_id}}" | |
| * BUNDLES: SET VARIABLES IN LIQUID (within <script>) | |
| {% assign is_bundle = false %} | |
| {% if product.metafields.sms.bundle_products != blank %} |
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
| module CountDown = { | |
| /** matches css animation play states */ | |
| type playState = [ | `running | `paused]; | |
| type value = { | |
| time: int, | |
| play: unit => unit, | |
| pause: unit => unit, | |
| restart: unit => unit, | |
| playState, |
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
| [@bs.module "react"] | |
| external useMemo8: | |
| ([@bs.uncurry] (unit => 'any), ('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h)) => 'any = | |
| "useMemo"; | |
| [@bs.module "react"] | |
| external useCallback4: | |
| ([@bs.uncurry] ('input => 'output), ('a, 'b, 'c, 'd)) => | |
| React.callback('input, 'output) = | |
| "useCallback"; |
NewerOlder