Skip to content

Instantly share code, notes, and snippets.

Avatar
🤘
hello world, guys

Thiago Bruno othiagobruno

🤘
hello world, guys
  • Balsas
View GitHub Profile
View auth hook
import React, { createContext, useContext, useEffect, useState } from 'react';
import api from 'services/api';
import interceptResponse from 'services/interceptResponse';
const AuthContext = createContext({});
export const AuthProvider = ({ children }) => {
const [auth, setAuth] = useState({
isAuth: false,
data: {},
View gist:0b29a8d23a012f29442bafe1d22fe321
// retorno de todos url:
// v1/admin/outdoors, { type: '', locale: '', filter: expiration | mais recente }
[
{
name: 'Teste Outdoor 01',
date_start: '2020-12-04',
type: 'slide' | 'banner',
date_end: '2020-12-25',
offer:{
id: '',
View gist:e932c0238a799a42e2dd467bdf155cf3
const capa_business = {
original:
'https://img.elo7.com.br/product/zoom/19D34B3/adesivo-de-parede-predios-preto-e-branco-adesivo-para-cozinha.jpg',
small:
'https://img.elo7.com.br/product/zoom/19D34B3/adesivo-de-parede-predios-preto-e-branco-adesivo-para-cozinha.jpg',
};
const logo_business = {
original:
'https://www.sinpma.com.br/wp-content/uploads/2018/12/28-12-2018-19_23_17-CONVENIOS-SINPMA-1.docx-Modo-de-Compatibilidade-Word.png',
View gist:5ce0075b41bc73d2b3b43f23312397a0
{
"status": "OK",
"msg": "Consulta Realizada com Sucesso",
"total": 1,
"summary": {},
store:{
"id": 12,
"name": "Bambinos ",
"slug": "bambinos",
},