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 { post } from 'axios'; | |
import {Message} from 'semantic-ui-react' | |
import { publitioApi } from 'publitio_js_sdk' | |
window.publitioApi = publitioApi | |
// init api with your keys | |
const publitio = window.publitioApi("p0SvZWb9i9NsJRwzTb0L","APP7NkwNQLBMHD6h5N0pxej3A5Xp3w10"); | |
window.publitio = publitio | |
//Show Image before Upload | |
//https://medium.com/@650egor/react-30-day-challenge-day-2-image-upload-preview-2d534f8eaaa |
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
const mongoose = require('mongoose') | |
const Picture = mongoose.model('pictures') //Class to create an instance of a model | |
const {Schema} = mongoose | |
const Profiles = mongoose.model('profiles') | |
const _ = require('lodash') | |
module.exports = (app) => { | |
app.get('/api/pictures', async (req,res) => { |
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
const mongoose = require('mongoose') | |
const Profiles = mongoose.model('profiles') | |
const requireLogin = require('../middleware/requireLogin') | |
module.exports = (app) => { | |
app.get('/api/profiles', requireLogin, async (req,res) => { | |
const allProfiles = await Profiles.find({}) | |
res.send(allProfiles) | |
}) |
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
const mongoose = require('mongoose') | |
const Like = mongoose.model('likes') //Class to create an instance of a model | |
const Picture = mongoose.model('pictures') | |
const {Schema} = mongoose | |
module.exports = (app) => { | |
app.get('/api/likes', async (req,res) => { | |
const allLikes = await Like.find({}).sort({date:-1}) | |
res.send(allLikes) | |
//Actually need to send the picture and the user as well |
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, {Component} from 'react' | |
import Helmet from 'react-helmet' | |
export default ({orderId, amount, email}) => { | |
return ( | |
<Helmet> | |
<script> | |
{` | |
(function(){ | |
window['friendbuy'] = window['friendbuy'] || []; |
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
<script> | |
window['friendbuy'] = window['friendbuy'] || []; | |
window['friendbuy'].push(['site', 'site-77aac7d5-www.splitbud.com']); | |
window['friendbuy'].push(['track', 'customer', | |
{ | |
id: '', //INSERT CUSTOMER ID PARAMETER | |
email: '', //INSERT CUSTOMER EMAIL PARAMETER | |
first_name: '', //INSERT CUSTOMER FIRST NAME PARAMETER | |
last_name: '' //INSERT CUSTOMER LAST NAME PARAMETER | |
} |
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, {Component} from 'react' | |
import Helmet from 'react-helmet' | |
export default ({successOrderId, successAmount, successEmail}) => { | |
return ( | |
<Helmet> | |
<script> | |
{` | |
(function(){ | |
window['friendbuy'] = window['friendbuy'] || []; |
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
div, span, p, a, em, i, b, h1, h2, h3, h4, h5, h6, table, td, tr, th, button, input, | |
.ui.input>input, | |
.ui.form input[type=text], | |
textarea | |
{ | |
font-family: 'Montserrat', 'Helvetica Neue', 'Helvetica', sans-serif; | |
font-weight: 400; | |
} | |
/** Utilities **/ | |
.medium{ |
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
<div class="Navbar sticky"><div class="ui equal width grid"><div class="column t-left Navbar__menu"><div class="flex f-height"><div class="flex-center"><div class="desktop-hidden"><a class="mobile-icon" href="#"><i aria-hidden="true" class="bars icon"></i></a></div><div class="mobile-hidden"><a href="/flower"><span class="Navbar__link">Flower</span></a><a href="/edibles"><span class="Navbar__link">Edibles</span></a><a href="/prerolls"><span class="Navbar__link">Prerolls</span></a><a href="/vaporizers"><span class="Navbar__link">Vaporizers</span></a><a href="/concentrates"><span class="Navbar__link">Concentrates</span></a></div></div></div></div><div class="six wide column center Navbar__logo"><a href="/"><div class="flex splitbudLogo"><div class="flex-center f-height"><img class="img-responsive v-a-middle" src="https://s3-us-west-1.amazonaws.com/splitbud-static/website/menu/logo.svg"></div></div></a></div><div class="column t-right Navbar__cart mobile-hidden"><div class="flex f-height"><div class="flex-center |
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
{ | |
"routes": [ | |
{ | |
"method": "GET", | |
"path": "/orders", | |
"handler": "Order.find", | |
"config": { | |
"policies": [ | |
"global.isAuthenticated", | |
"global.targetUserIsLoggedInUser" |