Skip to content

Commit

Permalink
fix: 🐛 Fix a bug of release mode that TOC not showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
orangethewell committed Nov 20, 2024
1 parent 3e5dd35 commit 1d53fb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Open Witness Library",
"version": "0.1.0",
"version": "0.1.1",
"identifier": "com.open-witness-library.app",
"build": {
"beforeDevCommand": "npm run dev",
Expand All @@ -28,6 +28,11 @@
"bundle": {
"active": true,
"targets": "all",
"windows": {
"webviewInstallMode": {
"type": "embedBootstrapper"
}
},
"icon": [
"icons/32x32.png",
"icons/128x128.png",
Expand Down
3 changes: 2 additions & 1 deletion src/routes/publicationView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const PublicationView = () => {

useEffect(() => {
const fetchViewItems = async () => {
await invoke("catalog_open_connection", {filenameSymbol: symbol});
const viewItem = await invoke("catalog_get_publication_view_from", {filenameSymbol: symbol});
const documents = await fetchDocuments(viewItem.publication_view_items_documents);
setViewItems({
Expand All @@ -61,7 +62,7 @@ const PublicationView = () => {
});
};
fetchViewItems();
}, []);
}, [symbol]);

const fetchDocuments = async (items) => {
let documents = [];
Expand Down

0 comments on commit 1d53fb3

Please sign in to comment.