diff options
| author | Yash <[email protected]> | 2024-04-11 04:52:44 +0000 |
|---|---|---|
| committer | Yash <[email protected]> | 2024-04-11 04:52:44 +0000 |
| commit | 6dcc7d18c9be5e3a5e0a3ff60668424ee0158b4e (patch) | |
| tree | 179aa936536510cc707368fc7c330c4c7fbdc3f8 /apps/extension/src/App.tsx | |
| parent | novel editor (diff) | |
| parent | save user ID with url to ensure that same website can be saved by users (diff) | |
| download | supermemory-new-ui.tar.xz supermemory-new-ui.zip | |
Merge branch 'main' of https://github.com/Dhravya/supermemory into new-uinew-ui
Diffstat (limited to 'apps/extension/src/App.tsx')
| -rw-r--r-- | apps/extension/src/App.tsx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/apps/extension/src/App.tsx b/apps/extension/src/App.tsx index 551fb0d0..f563664f 100644 --- a/apps/extension/src/App.tsx +++ b/apps/extension/src/App.tsx @@ -1,9 +1,12 @@ -import { useEffect, useState } from 'react'; -import { z } from 'zod'; -import { userObj } from './types/zods'; -import { getEnv } from './util'; +import { useEffect, useState } from "react"; +import { z } from "zod"; +import { userObj } from "./types/zods"; +import { getEnv } from "./util"; -const backendUrl = getEnv() === "development" ? "http://localhost:3000" : "https://supermemory.dhr.wtf"; +const backendUrl = + getEnv() === "development" + ? "http://localhost:3000" + : "https://supermemory.dhr.wtf"; function App() { const [userData, setUserData] = useState<z.infer<typeof userObj> | null>( @@ -11,9 +14,9 @@ function App() { ); const doStuff = () => { - chrome.runtime.sendMessage({ type: 'getJwt' }, (response) => { + chrome.runtime.sendMessage({ type: "getJwt" }, (response) => { const jwt = response.jwt; - const loginButton = document.getElementById('login'); + const loginButton = document.getElementById("login"); if (loginButton) { if (jwt) { @@ -31,7 +34,7 @@ function App() { console.error(d.error); } }); - loginButton.style.display = 'none'; + loginButton.style.display = "none"; } } }); |