Skip to content

Commit

Permalink
feat: only show save if logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Nov 18, 2023
1 parent fe7c0e3 commit 6ffa5f3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions apps/canvas/widget/sharezone.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import context from "react-bootstrap/esm/AccordionContext";

const ModalBackdrop = styled.div`
position: fixed;
top: 0;
Expand Down Expand Up @@ -77,8 +79,8 @@ const save = () => {
canvas: {
"": JSON.stringify(getSnapshot()),
metadata: {
type: "canvas"
}
type: "canvas",
},
},
},
});
Expand All @@ -94,9 +96,11 @@ const toggleModal = () => {

return (
<>
<Button className="classic" onClick={save}>
<i class="bi bi-save"></i> save canvas
</Button>
{context.accountId && (
<Button className="classic" onClick={save}>
<i class="bi bi-save"></i> save canvas
</Button>
)}
{isModalOpen && (
<Modal onClose={toggleModal}>
<Widget src="hack.near/widget/create.hyperfile" />
Expand Down

0 comments on commit 6ffa5f3

Please sign in to comment.