Skip to content

Commit

Permalink
add meme button handles state properly and fix bug not showing media
Browse files Browse the repository at this point in the history
  • Loading branch information
0adiy committed May 27, 2024
1 parent 43db5e4 commit 19391e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "meme-manager",
"version": "0.0.1"
"version": "0.0.2"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -37,7 +37,12 @@
}
],
"security": {
"csp": "default-src 'self'; media-src 'self' asset: https://asset.localhost;"
"csp": {
"default-src": "self",
"img-src": "'self' https://* asset: https://asset.localhost",
"media-src": "'self' https://* asset: https://asset.localhost",
"style-src-elem": "'self' 'unsafe-inline'"
}
},
"bundle": {
"active": true,
Expand Down
5 changes: 4 additions & 1 deletion src/components/AddMemeButton.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { PlusIcon } from "@heroicons/react/24/outline";

import { useMemeFormStore } from "../store/useMemeFormStore";
export default function AddMemeButton() {
const { setModeAdd, reset } = useMemeFormStore();
const handelClick = () => {
reset();
setModeAdd();
document.getElementById("add_or_update_meme_modal").showModal();
};
return (
Expand Down

0 comments on commit 19391e3

Please sign in to comment.