This commit is contained in:
yxshv 2024-04-13 23:15:04 +05:30
parent a7d72c798d
commit 13cc8d8c5b
2 changed files with 2 additions and 5 deletions

View file

@ -80,7 +80,7 @@ function SideBar({ jwt }: { jwt: string }) {
const fetchSpaces = async () => {
setLoading(true)
chrome.runtime.sendMessage({ type: "fetchSpaces" }, (resp) => {
console.log(resp)
console.log('response',resp)
setSpaces(resp)
setLoading(false)
});

View file

@ -69,7 +69,7 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
})();
} else if (request.type === "fetchSpaces") {
const run = () => chrome.storage.local.get(["jwt"], async ({ jwt }) => {
chrome.storage.local.get(["jwt"], async ({ jwt }) => {
if (!jwt) {
console.error("No JWT found");
return;
@ -91,9 +91,6 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
});
run()
return true;