Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Patricio Vargas committed Aug 12, 2021
1 parent afcdd7d commit 4692a2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/containers/Scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const Scan = () => {
const { actions, setActions} = useContext(ActionsContext);

const scan = useCallback(async() => {

if ('NDEFReader' in window) {
try {
const ndef = new window.NDEFReader();
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Write.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const Write = () => {
const onWrite = async(message) => {
try {
const ndef = new window.NDEFReader();
await ndef.write({records: [{ recordType: "text", data: "Hello World!" }]});
console.log(`Value Saved!`);
await ndef.write({records: [{ recordType: "text", data: message }]});
alert(`Value Saved!`);
} catch (error) {
console.log(error);
}
Expand Down

0 comments on commit 4692a2f

Please sign in to comment.