diff --git a/changelog.md b/changelog.md
index 42aee69..2c23194 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,8 @@
# changelog
+### Saturday, 18/02/2017 - v2.7.2
+- Adding ability to delete a brew from the user page, incase the user creates a brew that makes the edit page unrender-able. (re:309)
+
## BIG NEWS
With the next major release of Homebrewery, v3.0.0, this tool *will no longer support raw HTML input for brew code*. Most issues and errors users are having are because of this feature and it's become too taxing to help and fix these issues.
diff --git a/client/homebrew/pages/userPage/brewItem/brewItem.jsx b/client/homebrew/pages/userPage/brewItem/brewItem.jsx
index fe694b2..9d1968c 100644
--- a/client/homebrew/pages/userPage/brewItem/brewItem.jsx
+++ b/client/homebrew/pages/userPage/brewItem/brewItem.jsx
@@ -2,6 +2,7 @@ const React = require('react');
const _ = require('lodash');
const cx = require('classnames');
const moment = require('moment');
+const request = require("superagent");
const BrewItem = React.createClass({
getDefaultProps: function() {
@@ -15,6 +16,24 @@ const BrewItem = React.createClass({
};
},
+ deleteBrew : function(){
+ if(!confirm("are you sure you want to delete this brew?")) return;
+ if(!confirm("are you REALLY sure? You will not be able to recover it")) return;
+
+ request.get('/api/remove/' + this.props.brew.editId)
+ .send()
+ .end(function(err, res){
+ location.reload();
+ });
+ },
+
+ renderDeleteBrewLink: function(){
+ if(!this.props.brew.editId) return;
+
+ return
+
+
+ },
renderEditLink: function(){
if(!this.props.brew.editId) return;
@@ -47,6 +66,7 @@ const BrewItem = React.createClass({
{this.renderEditLink()}
+ {this.renderDeleteBrewLink()}
}
diff --git a/package.json b/package.json
index 55cc795..8eafb4c 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown",
- "version": "2.7.1",
+ "version": "2.7.2",
"scripts": {
"dev": "node scripts/dev.js",
"quick": "node scripts/quick.js",
diff --git a/server.js b/server.js
index bddf5cc..f59009c 100644
--- a/server.js
+++ b/server.js
@@ -42,7 +42,6 @@ const welcomeText = require('fs').readFileSync('./client/homebrew/pages/homePage
const changelogText = require('fs').readFileSync('./changelog.md', 'utf8');
-
//Source page
String.prototype.replaceAll = function(s,r){return this.split(s).join(r)}
app.get('/source/:id', (req, res)=>{