Skip to content

Instantly share code, notes, and snippets.

View shawn-sandy's full-sized avatar
💭
I may be slow to respond.

Shawn Sandy shawn-sandy

💭
I may be slow to respond.
View GitHub Profile
import React from 'react'
import COMPONENT_NAME from './component-name'
import { ComponentStory, ComponentMeta } from "@storybook/react"
import { BADGE } from '@geometricpanda/storybook-addon-badges';
export default {
title: 'Elements/COMPONENT_NAMEs',
component: COMPONENT_NAME,
argTypes: {
/**
* ! issues calling onFailure
*/
useEffect(() => {
if (atsProgressStatus === 'INVALID_CREDENTIALS') {
callOnFailure();
next();
// onFailure();
console.log({ atsProgressStatus });
@shawn-sandy
shawn-sandy / diagrams.md
Last active July 12, 2022 20:56
Diagrams

‎‎​

// NOTE: this definitely is not working correctly, but is relatively close to what needs to be done
useEffect(() => {
if (existingIntegration) {
return;
}
if (atsLinkStatus === ExternalAtsLinkStatusKind.InvalidCredentials) {
onApiFailure();
} else {
// @ts-ignore
import React from 'react';
import { describe, expect, test, it } from 'vitest';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import App from '../App'
describe('App renders correctly', () => {
@shawn-sandy
shawn-sandy / App.test.tsx
Last active April 1, 2023 19:12
ViteReact
import { describe, expect, it } from 'vitest'
import App from './App'
import { render, screen, userEvent } from './utils/test-utils'
describe('Simple working test', () => {
it('the title is visible', () => {
render(<App />)
expect(screen.getByText(/Hello Vite \+ React!/i)).toBeInTheDocument()
})
@shawn-sandy
shawn-sandy / notes.md
Last active April 7, 2022 13:21
ZenPop Dev Notes

Dev Notes

Introduction

ZenDots take a break from the daily grind.

How to play

Dots move from the top to the bottom of the screen. A player tries to click on the dots and receives points when they are successful. Beat your last high score to add extra Zen to your day.

  • Click the start button to play.
  • POP as many dots as you can
@shawn-sandy
shawn-sandy / dialog.html
Last active March 26, 2022 16:49
Frontend Snippets
<!-- @format -->
<style>
dialog {
--diag-bg: whitesmoke;
--diag-bg-img: none;
--diag-x: 1.5rem;
--diag-y: 1.5rem;
--bk-drop: rgba(0, 0, 0, 0.5);
@shawn-sandy
shawn-sandy / README.md
Last active June 2, 2022 19:12
Hygen React component template

A Hygen template for quickly scaffolding components for react Apps

Hygen is a simple, fast, and scalable code generator that lives in your project.

Build ad-hoc generators quickly and full on project scaffolds.

✅ Local generators per project (and global, if you must)

✅ Built-in scaffolds to quickly create generators

@shawn-sandy
shawn-sandy / .gitignore
Last active March 11, 2022 21:38
Hygen react template
---
to: <%= absPath %>/.gitignore
---
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js