Skip to content

Commit

Permalink
chore: Time and ExternalLink cell components renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
ipapandinas committed Jan 4, 2024
1 parent fd9b2d1 commit a29d30d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions components/contributions-table/row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@ export const Labels = ({ labels }: ILabelsProps) => {
);
};

interface IOpenedDateProps {
interface ITimeProps {
timestamp: string;
}
export const OpenedDate = ({ timestamp }: IOpenedDateProps) => {
export const Time = ({ timestamp }: ITimeProps) => {
return <div className="">{formatDate(new Date(timestamp))}</div>;
};

interface IActionsProps {
interface IExternalLinkProps {
href: string;
}
export const Actions = ({ href }: IActionsProps) => {
export const ExternalLink = ({ href }: IExternalLinkProps) => {
return <Link isBlock showAnchorIcon href={href} color="foreground" />;
};
6 changes: 3 additions & 3 deletions components/contributions-table/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { Spinner } from "@nextui-org/spinner";
import { useInfiniteScroll } from "@nextui-org/use-infinite-scroll";
import { Contribution, PaginatedContributions } from "@/types/contribution";
import { Actions, Content, Labels, OpenedDate, Project } from "./row";
import { ExternalLink, Content, Labels, Time, Project } from "./row";
import { useContributions } from "@/hooks/useContributions";
import { KudosQueryParameters } from "@/lib/notion/types";

Expand Down Expand Up @@ -52,9 +52,9 @@ export const Table = ({ items, queries = {} }: ITableProps) => {
case "labels":
return <Labels labels={item.labels} />;
case "date":
return <OpenedDate timestamp={item.timestamp} />;
return <Time timestamp={item.timestamp} />;
case "actions":
return <Actions href={item.url} />;
return <ExternalLink href={item.url} />;
default:
return cellValue;
}
Expand Down

0 comments on commit a29d30d

Please sign in to comment.