@@ -133,10 +133,10 @@ const Repositories = ({ repositories }: RepositoriesProps): JSX.Element => {
+
-
diff --git a/lib/utils/github.ts b/lib/utils/github.ts
index 689d01e06a..59a896c8ed 100644
--- a/lib/utils/github.ts
+++ b/lib/utils/github.ts
@@ -90,8 +90,15 @@ const isValidPullRequestUrl = (url: string): boolean => {
return url.match(/((https?:\/\/)?(www\.)?github\.com\/[^\/]+\/[^\/]+\/pull\/[0-9]+)/) ? true : false;
};
+const getOwnerAndRepoNameFromUrl = (url: string): { owner: string; repoName: string } => {
+ const [, , , owner, repoName] = url.split("/");
+
+ return { owner, repoName };
+};
+
export {
getAvatarById,
+ getOwnerAndRepoNameFromUrl,
getAvatarByUsername,
getProfileLink,
getRepoIssuesLink,
diff --git a/lib/utils/urls.ts b/lib/utils/urls.ts
index ad86a77fef..cbeea8284a 100644
--- a/lib/utils/urls.ts
+++ b/lib/utils/urls.ts
@@ -1,5 +1,5 @@
export const siteUrl = (path: string = "") => {
- let url = process.env.NEXT_PUBLIC_BASE_URL || "/";
+ let url = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000/";
// Make sure to include `https://` when not localhost.
url = url.includes("http") ? url : `https://${url}`;
// Make sure to including trailing `/`.
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 6cde4eabf5..4f9e4c63f9 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -1,12 +1,12 @@
{
"name": "@open-sauced/insights",
- "version": "1.57.1-beta.10",
+ "version": "1.58.0-beta.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@open-sauced/insights",
- "version": "1.57.1-beta.10",
+ "version": "1.58.0-beta.3",
"hasInstallScript": true,
"license": "Apache 2.0",
"dependencies": {
diff --git a/package.json b/package.json
index 86fc22210e..7eca2f88e9 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "@open-sauced/insights",
"description": "πThe dashboard for open source discovery.",
"keywords": [],
- "version": "1.57.1-beta.10",
+ "version": "1.58.0-beta.3",
"author": "Brian Douglas
",
"private": true,
"license": "Apache 2.0",
diff --git a/stories/molecules/contributor-highlight-card.stories.tsx b/stories/molecules/contributor-highlight-card.stories.tsx
new file mode 100644
index 0000000000..f36a4796d0
--- /dev/null
+++ b/stories/molecules/contributor-highlight-card.stories.tsx
@@ -0,0 +1,93 @@
+import { TooltipProvider } from "@radix-ui/react-tooltip";
+import { Meta, StoryFn } from "@storybook/react";
+import ContributorHighlightCard from "components/molecules/ContributorHighlight/contributor-highlight-card";
+
+export default {
+ title: "Design System/Molecules/ContributorHighlightCard",
+} as Meta;
+
+const Template: StoryFn = (args) => (
+
+
+
+);
+
+export const Default = Template.bind({});
+export const PullRequest = Template.bind({});
+export const Issue = Template.bind({});
+export const BlogPost = Template.bind({});
+
+Default.args = {
+ title: "Contributor Highlight",
+ desc: "This is a description",
+ user: "bdougie",
+ prLink: "https://github.com/open-sauced/insights/pull/1",
+ shipped_date: "2023-01-19 13:24:51.000000",
+ emojis: [
+ {
+ name: "100",
+ url: "https://github.githubassets.com/images/icons/emoji/unicode/1f4af.png?v8",
+ display_order: 1,
+ id: "2",
+ created_at: "",
+ updated_at: "",
+ },
+ ],
+};
+
+PullRequest.args = {
+ title: "Contributor Highlight",
+ desc: "This is a description",
+ user: "bdougie",
+ prLink: "https://github.com/open-sauced/insights/pull/1",
+ shipped_date: "2023-01-19 13:24:51.000000",
+ emojis: [
+ {
+ name: "100",
+ url: "https://github.githubassets.com/images/icons/emoji/unicode/1f4af.png?v8",
+ display_order: 3,
+ id: "4",
+ created_at: "",
+ updated_at: "",
+ },
+ ],
+ type: "pull_request",
+};
+
+Issue.args = {
+ title: "Contributor Highlight",
+ desc: "This is a description",
+ user: "bdougie",
+ prLink: "https://github.com/open-sauced/insights/pull/1",
+ shipped_date: "2023-01-19 13:24:51.000000",
+ emojis: [
+ {
+ name: "100",
+ url: "https://github.githubassets.com/images/icons/emoji/unicode/1f4af.png?v8",
+ display_order: 3,
+ id: "4",
+ created_at: "",
+ updated_at: "",
+ },
+ ],
+ type: "issue",
+};
+
+BlogPost.args = {
+ title: "Contributor Highlight",
+ desc: "This is a description",
+ user: "bdougie",
+ prLink: "https://github.com/open-sauced/insights/pull/1",
+ shipped_date: "2023-01-19 13:24:51.000000",
+ emojis: [
+ {
+ name: "100",
+ url: "https://github.githubassets.com/images/icons/emoji/unicode/1f4af.png?v8",
+ display_order: 3,
+ id: "4",
+ created_at: "",
+ updated_at: "",
+ },
+ ],
+ type: "blog",
+};