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
query getProductFiltersByCategory($categoryIdFilter: FilterEqualTypeInput!) { | |
products(filter: { category_id: $categoryIdFilter }) { | |
aggregations { | |
label | |
count | |
attribute_code | |
options { | |
label | |
value | |
} |
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, { useMemo } from "react" | |
import { string, shape, array } from "prop-types" | |
import { mergeClasses } from "../../classify" | |
import GalleryItem from "./item" | |
import defaultClasses from "./gallery.css" | |
// map Magento 2.3.1 schema changes to Venia 2.0.0 proptype shape to maintain backwards compatibility | |
const mapGalleryItem = item => { | |
const { small_image } = item |
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, { Fragment, useEffect } from "react" | |
import { useProduct } from "@magento/peregrine/lib/talons/RootComponents/Product/useProduct" | |
import { Title, Meta } from "../../components/Head" | |
import { fullPageLoadingIndicator } from "../../components/LoadingIndicator" | |
import ProductFullDetail from "../../components/ProductFullDetail" | |
import { MagentoGraphQLTypes } from "../../util/apolloCache" | |
import getUrlKey from "../../util/getUrlKey" | |
import mapProduct from "../../util/mapProduct" |
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
/** | |
* @RootComponent | |
* description = 'Basic Product Page' | |
* pageTypes = PRODUCT | |
*/ | |
export { default } from "./product" |
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
cd user/data | |
prettier | |
--print-width 100 | |
--no-semi | |
--single-quote | |
--jsx-single-quote | |
--trailing-comma es5 | |
--arrow-parens avoid | |
--parser "markdown" "*.md" |
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
--- | |
title: "GatsbyJS y Leaflet: Cómo crear una aplicación para mostrar estadísticas sobre COVID-19" | |
media_order: "covid-map-thumbnail.jpg,video-post.gif,gatsby-home-example.jpg,covid-map-file-structure.jpg,covid-map-app.jpg,covid-map-coronavirus-app.jpg" | |
published: true | |
date: "30-03-2020 08:30" | |
publish_date: "30-03-2020 08:30" | |
taxonomy: | |
category: | |
- Articles | |
tag: |
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 Header from "../Header" | |
import Footer from "../Footer" | |
import MobileNav from "../MobileNav" | |
import "font-awesome/css/font-awesome.min.css" | |
import "../../styles/spectre.scss" | |
import "../../styles/theme.scss" | |
const Layout = ({ children }) => { |
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
posts.forEach((post, index) => { | |
const previous = index === posts.length - 1 ? null : posts[index + 1].node | |
const next = index === 0 ? null : posts[index - 1].node | |
const path = post.node.fileAbsolutePath | |
const regex = "/blog/" | |
if (path.match(regex)) { | |
createPage({ | |
path: `blog${post.node.fields.slug}`, | |
component: blogPost, |
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
// Create pages and blog posts. | |
const posts = result.data.pagesGroup.edges | |
const postsPerPage = 10 | |
const numPages = Math.ceil(posts.length / postsPerPage) | |
Array.from({ length: numPages }).forEach((_, i) => { | |
createPage({ | |
path: i === 0 ? `/blog` : `/blog/page:${i + 1}`, | |
component: blogPage, | |
context: { |
NewerOlder