Skip to content

Commit

Permalink
Dependancy Updates, Autodeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
timg512372 committed Oct 14, 2020
1 parent ac7452a commit a15bba3
Show file tree
Hide file tree
Showing 31 changed files with 3,205 additions and 4,772 deletions.
Binary file modified .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions .env.temp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
KEY=
SECRET=
CLOUD_NAME=
UPLOAD_PRESET=
PASSWORD=
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
/.next
.DS_Store
firebasekeys.json
cloudinarykeys.json
cloudinarykeys.json
.env.local
.vercel
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ All data stored on Firebase. Please email me for the keys.

Images are stored on Cloudinary.

Built using Grommet v1, React, and Next.js. Deployed using Now.
Built using Grommet v1, React, and Next.js. Deployed using Vercel.
9 changes: 5 additions & 4 deletions components/CloudinaryInput.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { Component } from 'react';
import Button from 'grommet/components/Button';
import cloudinaryKeys from '../cloudinarykeys.json';

class CloudinaryInput extends Component {
static defaultProps = {
label: 'Upload Image to Cloudinary'
label: 'Upload Image to Cloudinary',
};

processCloudinaryResult = (error, results) => {
Expand All @@ -16,9 +15,11 @@ class CloudinaryInput extends Component {
};

openCloudinaryUploader = () => {
const { cloud_name, upload_preset } = cloudinaryKeys;
cloudinary.openUploadWidget(
{ cloud_name, upload_preset: upload_preset },
{
cloud_name: process.env.NEXT_PUBLIC_CLOUD_NAME,
upload_preset: process.env.NEXT_PUBLIC_UPLOAD_PRESET,
},
this.processCloudinaryResult
);
};
Expand Down
17 changes: 8 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
const withSass = require('@zeit/next-sass');

module.exports = withSass({
module.exports = {
target: 'serverless',
sassLoaderOptions: {
includePaths: ['./node_modules']
sassOptions: {
includePaths: ['./node_modules'],
},

webpack(config, options) {
// Further custom configuration here
return {
...config,
node: {
fs: 'empty',
child_process: 'empty'
}
child_process: 'empty',
},
};
}
});
},
};
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"license": "MIT",
"dependencies": {
"@app-masters/react-cloudinary-uploader": "^0.1.41",
"@now/next": "^2.4.0",
"@zeit/next-sass": "^1.0.1",
"@vercel/next": "^2.6.27",
"animejs": "^2.2.0",
"axios": "^0.19.2",
"cheerio": "^1.0.0-rc.3",
Expand All @@ -17,12 +16,11 @@
"grommet": "^1.11.0",
"har-validator": "^5.1.3",
"js-sha256": "^0.9.0",
"next": "^9.0.3",
"next": "^9.5.5",
"next-redux-wrapper": "^2.0.0",
"next-routes": "^1.4.2",
"next-seo": "^1.6.0",
"next-seo": "^4.11.0",
"node-pre-gyp": "^0.12.0",
"node-sass": "^4.14.1",
"react": "^16.6.1",
"react-dom": "^16.6.1",
"react-particles-js": "^2.4.2",
Expand All @@ -34,6 +32,7 @@
"react-transition-group": "^2.5.0",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0",
"sass": "^1.27.0",
"ua-parser-js": "^0.7.20"
},
"devDependencies": {
Expand All @@ -52,6 +51,6 @@
"now-build": "next build"
},
"engines": {
"node": "14.x"
"node": "12.x"
}
}
38 changes: 19 additions & 19 deletions pages/Contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import firebase from 'firebase/app';
import 'firebase/database';
import * as types from '../redux/types.js';
import NextSeo from 'next-seo';
import { NextSeo } from 'next-seo';

import FormField from 'grommet/components/FormField';
import Button from 'grommet/components/Button';
Expand All @@ -11,7 +11,7 @@ class Contact extends Component {
static async getInitialProps({ store }) {
store.dispatch({
type: types.CHANGE_PAGE,
payload: 'c'
payload: 'c',
});

let db = firebase;
Expand All @@ -20,8 +20,8 @@ class Contact extends Component {
db.database()
.ref('projects')
.once('value')
.then(datasnapshot => {
datasnapshot.forEach(child => {
.then((datasnapshot) => {
datasnapshot.forEach((child) => {
project.push(child.key);
});
});
Expand All @@ -32,8 +32,8 @@ class Contact extends Component {
.database()
.ref('recipients')
.once('value')
.then(datasnapshot => {
datasnapshot.forEach(child => {
.then((datasnapshot) => {
datasnapshot.forEach((child) => {
if (child.val().archive == true) {
archive.push(child.key);
} else {
Expand All @@ -44,19 +44,19 @@ class Contact extends Component {

store.dispatch({
type: types.GET_RECIPIENTS,
payload: { links, archive }
payload: { links, archive },
});

store.dispatch({
type: types.GET_PROJECTS,
payload: project
payload: project,
});
}

state = {
name: '',
email: '',
message: ''
message: '',
};

renderButtons() {
Expand All @@ -80,12 +80,12 @@ class Contact extends Component {
return (
<div style={{ margin: this.props.desktop ? '0% 15% 0% 15%' : '0 0px 0 0px' }}>
<NextSeo
config={{
{...{
title: 'Contact | Sage Prosthetics',
twitter: { title: 'Contact | Sage Prosthetics' },
openGraph: {
title: 'Contact | Sage Prosthetics'
}
title: 'Contact | Sage Prosthetics',
},
}}
/>
<h2 style={{ textAlign: 'center' }}>Contact Us</h2>
Expand All @@ -95,30 +95,30 @@ class Contact extends Component {
style={{
display: 'flex',
alignItems: 'center',
flexDirection: 'column'
flexDirection: 'column',
}}
id="form1"
>
<FormField label="Name" size="medium" help="Required">
<input
style={{
fontWeight: 'lighter',
border: 'none'
border: 'none',
}}
type="text"
name="name"
onChange={event => this.setState({ name: event.target.value })}
onChange={(event) => this.setState({ name: event.target.value })}
/>
</FormField>
<FormField label="Email Address" size="medium" help="Required">
<input
style={{
fontWeight: 'lighter',
border: 'none'
border: 'none',
}}
type="email"
name="email"
onChange={event => this.setState({ email: event.target.value })}
onChange={(event) => this.setState({ email: event.target.value })}
/>
</FormField>

Expand All @@ -128,13 +128,13 @@ class Contact extends Component {
fontWeight: 'lighter',
height: '60%',
resize: 'none',
border: 'none'
border: 'none',
}}
type="text"
placeholder="Message"
name="message"
rows={10}
onChange={event => this.setState({ message: event.target.value })}
onChange={(event) => this.setState({ message: event.target.value })}
/>
</FormField>

Expand Down
Loading

1 comment on commit a15bba3

@vercel
Copy link

@vercel vercel bot commented on a15bba3 Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.