Skip to content

Commit

Permalink
feat: Add contributor's insight on the workspace. (#4060)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Taylor <[email protected]>
  • Loading branch information
oyezaheer and nickytonline authored Aug 29, 2024
1 parent d9b8cd1 commit 7c4b60b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion components/Workspaces/WorkspaceHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { SquareFillIcon } from "@primer/octicons-react";
import { FaEdit } from "react-icons/fa";
import { FiCopy } from "react-icons/fi";
import { usePostHog } from "posthog-js/react";
import Link from "next/link";
import { HiOutlineUsers } from "react-icons/hi2";
import Button from "components/shared/Button/button";
import useSupabaseAuth from "lib/hooks/useSupabaseAuth";
import { shortenUrl } from "lib/utils/shorten-url";
Expand Down Expand Up @@ -45,8 +47,19 @@ export const WorkspaceHeader = ({ workspace, children }: WorkspaceHeaderProps) =
</span>
<Pill className="font-medium" text={workspace.is_public ? "Public" : "Private"} />
</h1>
<div className="flex gap-2 justify-end">
<div className="flex gap-2 justify-end flex-wrap">
{children}

<Link
href={`/workspaces/${workspace.id}/contributor-insights`}
className="my-auto gap-2 items-center shrink-0 place-self-end bg-orange-50 text-[#ed5f00] font-inter font-semibold hover:bg-orange-100 text-[14px] px-4 py-2 rounded-md transition-colors duration-200"
>
<span className="flex gap-2 items-center">
<HiOutlineUsers />
Contributor insights
</span>
</Link>

<Button
variant="outline"
onClick={copyUrlToClipboard}
Expand Down

0 comments on commit 7c4b60b

Please sign in to comment.