docs: Update api reference (#1410)
This commit is contained in:
+3819
-585
File diff suppressed because it is too large
Load Diff
+1126
-1047
File diff suppressed because it is too large
Load Diff
+677
-667
File diff suppressed because it is too large
Load Diff
+707
-699
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ routes:
|
||||
path: /products/:id
|
||||
route: /products
|
||||
description: >
|
||||
A product represents the object, that is to be sold on the website. A product can have variants, that differ by e.g. size and color.
|
||||
A product represents the object, that are to be sold on the website. A product can have variants, that differ by e.g. size and color.
|
||||
endpoints:
|
||||
- path: /:id
|
||||
method: GET
|
||||
|
||||
@@ -20,8 +20,9 @@ const createCustomNode = ({ name, node, createNode }) => {
|
||||
let requestBodyValues = undefined
|
||||
|
||||
if (values.requestBody && values.requestBody.content) {
|
||||
requestBodyValues =
|
||||
values.requestBody.content["application/json"].schema
|
||||
requestBodyValues = values.requestBody.content.hasOwnProperty("application/json") ?
|
||||
values.requestBody.content["application/json"].schema :
|
||||
values.requestBody.content["multipart/form-data"].schema
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -6,11 +6,16 @@ import React from 'react'
|
||||
import { ThemeToggler } from 'gatsby-plugin-dark-mode'
|
||||
import { useColorMode } from 'theme-ui'
|
||||
|
||||
const isBrowser = typeof window !== "undefined"
|
||||
|
||||
export default function ColorModeToggler () {
|
||||
const [, setColorMode] = useColorMode()
|
||||
|
||||
function checkLocalStorage (currentTheme, toggleTheme) {
|
||||
//check that theme local storage values are set correctly
|
||||
if (!isBrowser) {
|
||||
return currentTheme;
|
||||
}
|
||||
let themeUiColorMode = window.localStorage.getItem('theme-ui-color-mode');
|
||||
let theme = window.localStorage.getItem('theme')
|
||||
if (!themeUiColorMode) {
|
||||
|
||||
Reference in New Issue
Block a user