You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importinitSqlJsfrom"sql.js";// Required to let webpack 4 know it needs to copy the wasm file to our assets// import sqlWasm from "!!file-loader?name=sql-wasm-[contenthash].wasm!sql.js/dist/sql-wasm.wasm";const[db,setDb]=useState(null)useEffect(()=>{if(db==null){initSqlJs({locateFile: sqlWasm}).then(SQL=>setDb(newSQL.Database())).catch(err=>console.error(err)||Message.error("init sqlite failed"));}},[db])