Skip to content

Commit 1fd5741

Browse files
committed
get chrome extension button
1 parent edf7067 commit 1fd5741

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

apps/web/src/app/MessagePoster.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function MessagePoster({ jwt }: { jwt: string }) {
1010

1111
return (
1212
<button
13+
className="p-2"
1314
onClick={() => {
1415
if (typeof window === "undefined") return;
1516
window.postMessage({ jwt }, "*");

apps/web/src/components/Sidebar/index.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Bin } from "@/assets/Bin";
88
import { Avatar, AvatarFallback, AvatarImage } from "@radix-ui/react-avatar";
99
import { signOut, useSession } from "next-auth/react";
1010
import MessagePoster from "@/app/MessagePoster";
11+
import Chrome from "@/lib/icons";
1112

1213
export type MenuItem = {
1314
icon: React.ReactNode | React.ReactNode[];
@@ -125,6 +126,12 @@ export default function Sidebar({
125126
selectedItem={selectedItem}
126127
setSelectedItem={setSelectedItem}
127128
/>
129+
<a
130+
className="mb-4 flex items-center justify-center p-2 text-center text-sm text-sky-500"
131+
href="https://chromewebstore.google.com/detail/supermemory/afpgkkipfdpeaflnpoaffkcankadgjfc?hl=en-GB&authuser=0"
132+
>
133+
<Chrome className="h-6 w-6" />
134+
</a>
128135
<MessagePoster jwt={jwt} />
129136
</div>
130137
<AnimatePresence>

apps/web/src/lib/icons.tsx

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import * as React from "react";
2+
import type { SVGProps } from "react";
3+
const Chrome = (props: SVGProps<SVGSVGElement>) => (
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
preserveAspectRatio="xMidYMid"
7+
viewBox="0 0 190.5 190.5"
8+
width="1em"
9+
height="1em"
10+
{...props}
11+
>
12+
<path
13+
fill="#fff"
14+
d="M95.252 142.873c26.304 0 47.627-21.324 47.627-47.628s-21.323-47.628-47.627-47.628-47.627 21.324-47.627 47.628 21.323 47.628 47.627 47.628z"
15+
/>
16+
<path
17+
fill="#229342"
18+
d="m54.005 119.07-41.24-71.43a95.227 95.227 0 0 0-.003 95.25 95.234 95.234 0 0 0 82.496 47.61l41.24-71.43v-.011a47.613 47.613 0 0 1-17.428 17.443 47.62 47.62 0 0 1-47.632.007 47.62 47.62 0 0 1-17.433-17.437z"
19+
/>
20+
<path
21+
fill="#fbc116"
22+
d="m136.495 119.067-41.239 71.43a95.229 95.229 0 0 0 82.489-47.622A95.24 95.24 0 0 0 190.5 95.248a95.237 95.237 0 0 0-12.772-47.623H95.249l-.01.007a47.62 47.62 0 0 1 23.819 6.372 47.618 47.618 0 0 1 17.439 17.431 47.62 47.62 0 0 1-.001 47.633z"
23+
/>
24+
<path
25+
fill="#1a73e8"
26+
d="M95.252 132.961c20.824 0 37.705-16.881 37.705-37.706S116.076 57.55 95.252 57.55 57.547 74.431 57.547 95.255s16.881 37.706 37.705 37.706z"
27+
/>
28+
<path
29+
fill="#e33b2e"
30+
d="M95.252 47.628h82.479A95.237 95.237 0 0 0 142.87 12.76 95.23 95.23 0 0 0 95.245 0a95.222 95.222 0 0 0-47.623 12.767 95.23 95.23 0 0 0-34.856 34.872l41.24 71.43.011.006a47.62 47.62 0 0 1-.015-47.633 47.61 47.61 0 0 1 41.252-23.815z"
31+
/>
32+
</svg>
33+
);
34+
export default Chrome;

0 commit comments

Comments
 (0)