/
help.tsx
75 lines (64 loc) · 2.78 KB
/
help.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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";
import { version } from "../../package.json";
const Help = () => (
<div className="p-4 bg-slate-800">
<div className="grid grid-cols-1 divide-y divide-white/40 divider-y-center-2 min-w-[320px] text-white">
<header className="flex justify-between">
<div className="flex items-center gap-2">
<button
className="rounded-full p-2 bg-slate-700 hover:bg-slate-700/50"
onClick={() => {
goBack();
}}
>
<FaChevronLeft className="text-osOrange text-white" />
</button>
<img
alt="OpenSauced logo"
className="w-[100%]"
src={OpenSaucedLogo}
/>
</div>
<div className="flex justify-center flex-col">
<a
href={`https://github.com/open-sauced/ai/releases/tag/v${version}`}
rel="noreferrer"
target="_blank"
>
{version}
</a>
</div>
</header>
<main className="main-content text-white">
<h3 className="text font-medium text-base leading-10">Help:</h3>
<div className="tools flex flex-col gap-2">
{EXTERNAL_RESOURCES.map(externalLink => (
<a
key={externalLink.key}
className="flex items-center bg-slate-700 hover:bg-slate-700/70 text-white hover:text-orange no-underline gap-2 p-1.5 px-3 w-full rounded-sm font-medium text-sm"
href={externalLink.link}
rel="noreferrer"
target="_blank"
>
{externalLink.key === "Docs" && <HiOutlineBookOpen />}
{externalLink.key === "Issues" && <VscIssues />}
{externalLink.key === "Discussions" && (
<HiOutlineChatBubbleLeftRight />
)}
{externalLink.key}
</a>
))}
</div>
</main>
</div>
</div>
);
export default Help;