Skip to content

Instantly share code, notes, and snippets.

View adamkpurdy's full-sized avatar
🌎
Learning to juggle

Adam Purdy adamkpurdy

🌎
Learning to juggle
View GitHub Profile
### Keybase proof
I hereby claim:
* I am adamkpurdy on github.
* I am kpapro (https://keybase.io/kpapro) on keybase.
* I have a public key ASBtiS8NDfcW3DxNnrLpUeS_bMsTR27LmDpNIXKS7DsCYAo
To claim this, I am signing this object:
<script>
export default {
name: 'SomeRoutePage',
preFetch({ store, redirect }) {
store.state.$firebase.auth().onAuthStateChanged((user) => {
if (!user) redirect('/login');
});
},
}
</script>
<template>
<div id="q-app">
<router-view />
</div>
</template>
<script>
import firebase from 'firebase';
import 'firebase/firestore';
import firebaseApp from 'firebase/app';
@adamkpurdy
adamkpurdy / baseContactForm.vue
Last active June 22, 2018 02:49
A vue component for a simple contact form
<template>
<section
class="base-contact-form row justify-between"
data-cy="base-contact-form"
>
<q-field
class="q-my-md col-12 col-lg-5"
v-for="(field, index) in $options.inputs"
:key="index"
:error="$v.baseContactFormData[index].$error"
@adamkpurdy
adamkpurdy / registration.vue
Last active June 21, 2018 23:19
Registration parent component
<template>
<q-layout view="hHh Lpr lFf" class="bg-green-1">
<!-- (Optional) The Header -->
<q-layout-header reveal>
<q-toolbar class="bg-secondary">
<q-toolbar-title class="row items-center">
<router-link to="/user/providers" class="col-6 text-white">Dashboard</router-link>
<a target="_blank" href="http://" class="col-6 text-right text-white">Providers</a>
</q-toolbar-title>
@adamkpurdy
adamkpurdy / state.js
Last active June 21, 2018 23:19
Initial state object for applications
export default {
provider: {
contactInfo: {
fullName: '',
email: '',
streetAddress: '',
city: '',
state: '',
zipCode: '',
cellPhone: '',
import React, { Component } from 'react';
import classnames from 'classnames';
export default class ProfileSummary extends Component {
constructor(props) {
super(props);
this.state = {
editable: false,
};