this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix async/await

+3 -2
+3 -2
src/pages/account-statuses.jsx
··· 30 30 } 31 31 })(); 32 32 33 - function _isSearchEnabled(instance) { 33 + async function _isSearchEnabled(instance) { 34 34 const { masto } = api({ instance }); 35 - const results = masto.v2.search.fetch({ 35 + const results = await masto.v2.search.fetch({ 36 36 q: 'from:me', 37 37 type: 'statuses', 38 38 limit: 1, ··· 72 72 if (!account?.acct) return; 73 73 (async () => { 74 74 const enabled = await isSearchEnabled(instance); 75 + console.log({ enabled }); 75 76 setSearchEnabled(enabled); 76 77 })(); 77 78 }, [instance, sameCurrentInstance, account?.acct]);