| BEFORE | AFTER |
|---|---|
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
| /** | |
| * Wizard State Machine — Prototype | |
| * | |
| * Unified wizard primitive inspired by XState 5. Steps, guards, | |
| * sub-steps, and transitions are defined as static data. Guard | |
| * implementations are provided separately (like XState's `setup()`) | |
| * where they have access to React hooks and reactive state. | |
| * | |
| * The reducer handles pure navigation. Guards are resolved in the | |
| * hook layer before dispatching — keeping the reducer testable |
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 { | |
| format as dateFnsFormat, | |
| formatDistanceToNow, | |
| isToday, | |
| isValid, | |
| isYesterday, | |
| parseISO, | |
| } from 'date-fns'; | |
| /** |
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
| { | |
| "window.autoDetectColorScheme": true, | |
| "workbench.colorTheme": "GitHub Dark", | |
| "workbench.preferredLightColorTheme": "GitHub Light", | |
| "workbench.preferredDarkColorTheme": "GitHub Dark", | |
| "workbench.tree.indent": 20, | |
| "editor.fontFamily": "JetBrains Mono NL, Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontSize": 16, | |
| "editor.tabSize": 2, | |
| "editor.cursorStyle": "block", |
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 PropTypes from 'prop-types' | |
| import Link from 'next/link' | |
| | |
| // Checks against absolute URLs that share 👇 so | |
| // we can still pass it along to our internal link component | |
| const domainRegex = /http[s]*:\/\/[www.]*YOURDOMAIN\.com[/]?/ | |
| | |
| const TextLink = ({ href, ...rest }) => { | |
| const sameDomain = domainRegex.test(href) | |
| |
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
| function useBoolean(initialState = false) { | |
| const [state, setState] = React.useState(initialState) | |
| const handlers = React.useMemo( | |
| () => ({ | |
| on: () => { | |
| setState(true) | |
| }, | |
| off: () => { | |
| setState(false) |
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 container = { | |
| hidden: { opacity: 0 }, | |
| show: { | |
| opacity: 1, | |
| transition: { | |
| staggerChildren: 0.25, | |
| }, | |
| }, | |
| } |
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
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| stable_website_preview_cherry_pick: | |
| runs-on: ubuntu-latest | |
| name: Cherry pick main to stable-website-preview branch | |
| steps: |
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
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ########################################################################M@############################################################# | |
| #########################################################x############## |
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 {MDXProvider} from '@mdx-js/react'; | |
| import {MDXComponents} from 'components/MDX/MDXComponents'; | |
| import {Toc} from 'components/Toc/Toc'; | |
| import * as React from 'react'; | |
| export interface MarkdownProps<Frontmatter> { | |
| meta: Frontmatter; | |
| children?: React.ReactNode; | |
| } |
NewerOlder