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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 { useState } from 'react'; | |
function SimpleReactFileUpload() { | |
const [file, setFile] = useState(null); | |
function onChange(e) { | |
setFile(e.target.files[0]) | |
} | |
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
# get schema to .graphql | |
npx get-graphql-schema https://my-app.dev/graphql > schema.graphql | |
# get schema to .json | |
npx get-graphql-schema https://my-app.dev/graphql -j > graphql_schema.json |
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
#!/bin/bash | |
: ' | |
To use snowpack we want purge all /require() from our code | |
unfortunately the graphql-ppx adding gql tag by require | |
require("apollo/client").gql so we must get rid of it | |
1. We store our mutations and queries in /queries and /mutations folders | |
2. We add graphql-tag import and remove require | |
' |
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 React from 'react'; | |
import { getToken } from '@igip-react/util-auth'; | |
import { handleError, ApiError } from './utils/handleError'; | |
import { getErrorMessage } from './utils/getErrorMessage'; | |
export const HEADERS = { | |
Accept: 'application/json, text/javascript', | |
'Content-Type': 'application/json', | |
}; |
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
{ | |
"$schema": "vscode://schemas/color-theme", | |
"type": "dark", | |
"colors": { | |
"activityBar.background": "#121212", | |
"activityBar.dropBackground": "#121212", | |
"activityBar.foreground": "#b3b3b3", | |
"activityBarBadge.background": "#1db954", | |
"activityBarBadge.foreground": "#ffffff", | |
"button.background": "#535353", |
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
error: build failed with exit code: 1 | |
build log: | |
# esy-build-package: building: @opam/dune-configurator@opam:2.5.1 | |
# esy-build-package: pwd: /Users/pawelfalisz/.esy/3/b/opam__s__dune_configurator-opam__c__2.5.1-ac6455de | |
# esy-build-package: running: 'dune' 'build' '-p' 'dune-configurator' '-j' '4' '@install' | |
ocamlc otherlibs/configurator/src/.configurator.objs/byte/configurator__V1.{cmo,cmt} (exit 2) | |
(cd _build/default && /Users/pawelfalisz/.esy/3_____________________________________________________________/i/ocaml-4.8.1000-426898cd/bin/ocamlc.opt -w -40 -safe-string -g -bin-annot -I otherlibs/configurator/src/.configurator.objs/byte -I /Users/pawelfalisz/.esy/3_____________________________________________________________/i/opam__s__dune_private_libs-opam__c__2.6.2-60a815ed/lib/dune-private-libs/dune-lang -I /Users/pawelfalisz/.esy/3_____________________________________________________________/i/opam__s__dune_private_libs-opam__c__2.6.2-60a815ed/lib/dune-private-libs/ocaml-config - |
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 {Formik } from 'formik'; | |
import moment from "moment" | |
//Jezeli np bylaby zmiana formatu daty, powiedzmy komponent zwraca moment, | |
//a chcialbys DD.MM.YYYY - i taka wartosc ostatecznie wpadnie do twoich values | |
function formatDate(momentDate) { | |
return moment(momentDate).format("DD.MM.YYYY") | |
}; |
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; | |
open Domain; | |
type action = | |
| UpdateTracks(list(track)) | |
| InitPlaylist | |
| UpdatePlaylistName(string, int) | |
| ToggleArtistList; | |
type playlist = { |
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 FetchingScreen; | |
open Belt; | |
type action = | |
| UpdateTracks(list(track)) | |
| InitPlaylist; | |
type playlist = { | |
name: string, | |
description: string, |
NewerOlder