This file contains 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 { http } from "../../service/api"; | |
import { Card } from "./Card"; | |
import { Header, Spinner } from "../../components"; | |
import { useQuery } from "react-query"; | |
export default function Products() { | |
const { isLoading, isError, data } = useQuery( | |
"todos", | |
() => http.get("/products").then(({ data }) => data.products) // http contains baseURL with `/api` | |
); |
This file contains 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 { http } from "../../service/api"; | |
import { Card } from "./Card"; | |
import { Header, Spinner } from "../../components"; | |
import { useQuery } from "react-query"; | |
export default function Products() { | |
const { isLoading, isError, data } = useQuery( | |
"todos", | |
() => http.get("/products").then(({ data }) => data.products) // http container baseURL with `/api` | |
); |
This file contains 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 {mount, createLocalVue} from '@vue/test-utils'; | |
import Vuetify from 'vuetify'; | |
export function factory (component, propsData) { | |
const vuetify = new Vuetify(); | |
const localVue = createLocalVue(); | |
return mount(component, { | |
propsData, | |
localVue, |
This file contains 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
Show hidden characters
{ | |
"folders": [ | |
{ | |
"path": "." | |
} | |
], | |
"settings": { | |
"workbench.colorCustomizations": { | |
"titleBar.activeBackground": "#007c27", | |
"titleBar.activeForeground": "#ffffff", |
This file contains 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
Cypress.on("window:before:load", win => { | |
win.handleFromCypress = function(request) { | |
return fetch(request.url, { | |
method: request.method, | |
headers: request.requestHeaders, | |
body: request.requestBody | |
}) | |
.then(res => { | |
return new Promise(resolve => { | |
res.json().then(body => { |
This file contains 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
{ | |
"Vue Simple Component": { | |
"scope": "vue", | |
"prefix": "vsc", | |
"body": [ | |
"<script>", | |
"export default {", | |
" name: '$1',", | |
"};", | |
"</script>", |
This file contains 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
/* eslint-disable no-undef */ | |
/// <reference types="cypress" /> | |
const visitFirstVideo = () => | |
cy.visit('/?class=o-que-ha-de-novo-no-vue-3-introducao'); | |
const visitSecondVideo = () => | |
cy.visit('/?class=o-que-ha-de-novo-no-vue-3-instalacao'); |
This file contains 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 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 { buildSchema, graphql } from "graphql"; | |
// Construct a schema, using GraphQL schema language | |
let graphqlSchema = buildSchema(` | |
type Query { | |
recipes: [Recipe] | |
recipes_by_pk(id: Int!): Recipe | |
} | |
type Recipe { | |
id: ID! |
This file contains 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
{"lastUpload":"2020-03-30T17:16:21.561Z","extensionVersion":"v3.4.3"} |