diff --git a/src/App.tsx b/src/App.tsx index c1605c54..770fb541 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,7 +5,6 @@ import Loading from "./pages/loading"; import { useAuth } from "./hooks/useAuth"; import { goTo } from "react-chrome-extension-router"; - const App = () => { const { isTokenValid } = useAuth(); diff --git a/src/constants.ts b/src/constants.ts index 29d23428..f3765a6a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -23,3 +23,10 @@ export const GITHUB_PR_COMMENT_EDITOR_SELECTOR = "flex-nowrap d-inline-block mr- export const GITHUB_REPO_ACTIONS_SELECTOR = ".pagehead-actions"; export const GITHUB_PR_COMMENT_TEXT_AREA_SELECTOR = "pull_request[body]"; export const GITHUB_PR_BASE_BRANCH_SELECTOR = "css-truncate css-truncate-target"; + +// External Links +export const EXTERNAL_RESOURCES = [ + { link: "https://docs.opensauced.pizza/chrome-extension/introduction-to-the-chrome-extension/", key: "Docs" }, + { link: "https://github.com/open-sauced/ai/issues", key: "Issues" }, + { link: "https://github.com/orgs/open-sauced/discussions", key: "Discussions" }, +]; diff --git a/src/pages/help.tsx b/src/pages/help.tsx new file mode 100644 index 00000000..99a17de9 --- /dev/null +++ b/src/pages/help.tsx @@ -0,0 +1,62 @@ +import { FaChevronLeft } from "react-icons/fa"; +import OpenSaucedLogo from "../assets/opensauced-logo.svg"; +import { EXTERNAL_RESOURCES } from "../constants"; +import { + HiOutlineBookOpen, + HiOutlineChatBubbleLeftRight, +} from "react-icons/hi2"; +import { goBack } from "react-chrome-extension-router"; +import { VscIssues } from "react-icons/vsc"; + +const Help = () => ( +
+
+
+
+ + + OpenSauced logo +
+
+ +
+

Help:

+ +
+ {EXTERNAL_RESOURCES.map((externalLink) => ( + + {externalLink.key === "Docs" && } + + {externalLink.key === "Issues" && } + + {externalLink.key === "Discussions" && ( + + )} + + {externalLink.key} + + ))} +
+
+
+
+); + +export default Help; diff --git a/src/pages/home.tsx b/src/pages/home.tsx index 362335cd..c80bab2e 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -1,45 +1,47 @@ -import { HiArrowTopRightOnSquare, HiPencil, HiUserCircle } from "react-icons/hi2"; +import { + HiArrowTopRightOnSquare, + HiOutlineQuestionMarkCircle, + HiPencil, + HiUserCircle, +} from "react-icons/hi2"; import OpenSaucedLogo from "../assets/opensauced-logo.svg"; import { useAuth } from "../hooks/useAuth"; import { useOpensaucedUserCheck } from "../hooks/useOpensaucedUserCheck"; import { Profile } from "./profile"; import { goTo } from "react-chrome-extension-router"; import AIPRDescription from "./aiprdescription"; +import Help from "./help"; const Home = () => { const { user } = useAuth(); const { currentTabIsOpensaucedUser, checkedUser } = useOpensaucedUserCheck(); return ( -
-
-
- OpenSauced logo +
+
+
+ OpenSauced logo - {user && ( - - )} -
+ User avatar + + )} +
-
-

Tools:

+
+

Tools:

{ {currentTabIsOpensaucedUser && ( - - )} + + )}
-
+
+ +
+ +
+
- ); };