forked from sidseh/DashSOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
639 additions
and
393 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Include the Main React Dependencies | ||
var React = require("react"); | ||
var ReactDOM = require("react-dom"); | ||
|
||
// Include the main Parent Component | ||
var Parent = require("./components/register"); | ||
|
||
// This code here allows us to render our main component (in this case Parent) | ||
ReactDOM.render(<register />, document.getElementById("app")); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
////////////FUTURE IMPLEMANTATION/////////////// |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//including react | ||
var react = require ("react"); | ||
|
||
// Requiring our helper for making API calls | ||
var helpers = require("../utils/helpers"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Here we will utilize the axios library to perform GET/POST requests | ||
var axios = require("axios"); | ||
|
||
// Exporting an object with methods for retrieving and posting data to our API | ||
module.exports = { | ||
// Returns a promise object we can .then() off inside our Parent component | ||
getClicks: function() { | ||
return axios.get("/api"); | ||
}, | ||
// Also returns a promise object we can .then() off inside our Parent component | ||
// This method takes in an argument for what to post to the database | ||
saveClicks: function(clickData) { | ||
return axios.post("/api", clickData); | ||
} | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
// This may be confusing but here Sequelize (capital) references the standard library | ||
var Sequelize = require("sequelize"); | ||
|
||
// sequelize (lowercase) references my connection to the DB. You could name it something else, but I was just following their convention. | ||
var sequelize = require("../config/connection.js"); | ||
|
||
var pwid = sequelize.define("pwid", { | ||
pwid: { | ||
type: Sequelize.INTEGER, | ||
primaryKey: true, | ||
allowNull: false | ||
}, | ||
uid: { | ||
type: Sequelize.INTEGER, | ||
allowNull: false | ||
} | ||
}, { | ||
timestamps: false | ||
}); | ||
|
||
// Sync with DB | ||
pwid.sync(); | ||
|
||
module.exports = pwid; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
// This may be confusing but here Sequelize (capital) references the standard library | ||
var Sequelize = require("sequelize"); | ||
|
||
// sequelize (lowercase) references my connection to the DB. You could name it something else, but I was just following their convention. | ||
var sequelize = require("../config/connection.js"); | ||
|
||
var pw = sequelize.define("pw", { | ||
pwid: { | ||
type: Sequelize.INTEGER, | ||
primaryKey: true, | ||
allowNull: false | ||
}, | ||
pw: { | ||
type: Sequelize.STRING, | ||
allowNull: false | ||
} | ||
}, { | ||
timestamps: false | ||
}); | ||
|
||
// Sync with DB | ||
pw.sync(); | ||
|
||
module.exports = pw; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +0,0 @@ | ||
// This may be confusing but here Sequelize (capital) references the standard library | ||
var Sequelize = require("sequelize"); | ||
|
||
// sequelize (lowercase) references my connection to the DB. You could name it something else, but I was just following their convention. | ||
var sequelize = require("../config/connection.js"); | ||
|
||
var allergies = sequelize.define("allergies", { | ||
id: { | ||
type: Sequelize.INTEGER, | ||
primaryKey: true, | ||
allowNull: false | ||
}, | ||
uid: { | ||
type: Sequelize.INTEGER, | ||
allowNull: false | ||
}, | ||
allergies: { | ||
type: Sequelize.STRING, | ||
allowNull: false | ||
} | ||
}, { | ||
timestamps: false | ||
}); | ||
|
||
// Sync with DB | ||
allergies.sync(); | ||
|
||
module.exports = allergies; | ||
Empty file.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +0,0 @@ | ||
// This may be confusing but here Sequelize (capital) references the standard library | ||
var Sequelize = require("sequelize"); | ||
|
||
// sequelize (lowercase) references my connection to the DB. You could name it something else, but I was just following their convention. | ||
var sequelize = require("../config/connection.js"); | ||
|
||
var medications = sequelize.define("medications", { | ||
id: { | ||
type: Sequelize.INTEGER, | ||
primaryKey: true, | ||
allowNull: false | ||
}, | ||
uid: { | ||
type: Sequelize.INTEGER, | ||
allowNull: false | ||
}, | ||
medications: { | ||
type: Sequelize.STRING, | ||
allowNull: false | ||
} | ||
}, { | ||
timestamps: false | ||
}); | ||
|
||
// Sync with DB | ||
medications.sync(); | ||
|
||
module.exports = medications; | ||
Oops, something went wrong.