diff --git a/static/paper_list.js b/static/paper_list.js index 69c91cd..30458f5 100644 --- a/static/paper_list.js +++ b/static/paper_list.js @@ -14,6 +14,7 @@ const UTag = props => { const Paper = props => { const p = props.paper; + const adder = () => fetch("/add/" + p.id + "/" + prompt("tag to add to this paper:")) .then(response => console.log(response.text())); const subber = () => fetch("/sub/" + p.id + "/" + prompt("tag to subtract from this paper:")) @@ -22,6 +23,18 @@ const Paper = props => { const similar_url = "/?rank=pid&pid=" + p.id; const inspect_url = "/inspect?pid=" + p.id; + // if the user is logged in then we can show add/sub buttons + let utag_controls = null; + if(user) { + utag_controls = ( +
+ ) + } + return (