Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Amadeus Mozart409

🏠
Working from home
View GitHub Profile
@Mozart409
Mozart409 / [slug].js
Created Dec 14, 2020
Next.js getStaticPaths Multiple Params
View [slug].js
import { request, gql } from 'graphql-request'
import { PageHeading, Spacer } from '@components'
// gql query for getStaticPaths
const PageSlugsQuery = gql`
query PageBySlug {
pages {
slug
id
}
}
We couldn’t find that file to show.
@Mozart409
Mozart409 / BodyText.js
Last active Aug 21, 2020
react-bricks RichText
View BodyText.js
import React from "react";
import { Text, Plain, RichText, Image, Link, types } from "react-bricks";
import BlockNames from "../BlockNames";
import Colors from "../Colors";
//=============================
// Component to be rendered
//=============================
const BodyText = ({ onChange, backgroundColor, title, text, textColor }) => {
@Mozart409
Mozart409 / console output
Created Aug 12, 2020
React-Bricks Editor Error
View console output
react-bricks.cjs.production.min.js?cb9c:1 GET https://api.reactbricks.com/v1/admin/pages?type=&tag= 403 (Forbidden)
ae @ react-bricks.cjs.pro…ction.min.js?cb9c:1
eval @ react-bricks.cjs.pro…ction.min.js?cb9c:1
eval @ react-query.mjs?42ff:736
_catch @ react-query.mjs?42ff:316
eval @ react-query.mjs?42ff:734
eval @ react-query.mjs?42ff:335
eval @ react-query.mjs?42ff:822
_catch @ react-query.mjs?42ff:316
eval @ react-query.mjs?42ff:816
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
const sendingMessagesMachine = Machine({
id: 'sendingMessagesMachine',
initial: 'idle',
context: {
retries: 0
},
states: {
idle: {
on: {
SEARCHUSER: 'selectUser'
View machine.js
const toggleMachine = new Machine({
id: 'toggle',
initial: 'inactive',
states: {
inactive: { on: { TOGGLE: 'active' } },
active: { on: { TOGGLE: 'inactive' } }
}
});
View carbon-config.json
{
"paddingVertical": "31px",
"paddingHorizontal": "35px",
"backgroundImage": null,
"backgroundImageSelection": null,
"backgroundMode": "color",
"backgroundColor": "rgba(255,224,0,1)",
"dropShadow": true,
"dropShadowOffsetY": "20px",
"dropShadowBlurRadius": "68px",
@Mozart409
Mozart409 / error.log
Last active Apr 12, 2020
Trying to use .tif images
View error.log
➜ yarn start
yarn run v1.22.0
$ gatsby develop
success open and validate gatsby-configs - 0.067s
success load plugins - 1.294s
success onPreInit - 0.005s
success initialize cache - 0.030s
success copy gatsby files - 0.075s
success onPreBootstrap - 0.019s
success createSchemaCustomization - 0.010s