Skip to content

Commit

Permalink
Merge pull request #66 from w00ngja/jaewoong
Browse files Browse the repository at this point in the history
20230707
  • Loading branch information
Jaeppetto authored Jul 7, 2023
2 parents 2f91d2e + 46bebd0 commit bad89a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion project/src/components/OptionPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function OptionTest(props) {
setLoading(true);

const ingredients = State.selected;
const option = State.selectedOption;
let option = State.selectedOption;

if (State.selectedOption.length === 0) {
option = ["아무"];
Expand Down
12 changes: 12 additions & 0 deletions project/src/components/te.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const captureHTML = async () => {
const element = document.getElementById("captureElement");
const canvas = await html2canvas(element);
const image = canvas.toDataURL("image/png");
const recipeName = State.receiveData.dishName;

const link = document.createElement("a");
link.href = image;
link.download = `${recipeName}.png`;
link.click();
setUnshown(false);
};

0 comments on commit bad89a8

Please sign in to comment.