Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
indaviande committed Dec 11, 2024
1 parent c7573ba commit 0b926a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
25 changes: 4 additions & 21 deletions src/components/primitives/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const dividerStyles = tv(
{ look: "hype", vertical: true, class: "border-r-2" },
],
},
{ twMerge: false }
{ twMerge: false },
);

export type DividerProps = Component<
Expand All @@ -43,25 +43,8 @@ export type DividerProps = Component<
}
>;

export default function Divider({
vertical = false,
horizontal = true,
look,
className,
...props
}: DividerProps) {
if (horizontal && !vertical)
return (
<div
className={mergeClass(dividerStyles({ look }), className)}
{...props}
/>
);
export default function Divider({ vertical = false, horizontal = true, look, className, ...props }: DividerProps) {
if (horizontal && !vertical) return <div className={mergeClass(dividerStyles({ look }), className)} {...props} />;

return (
<div
className={mergeClass(dividerStyles({ look, vertical: true }), className)}
{...props}
/>
);
return <div className={mergeClass(dividerStyles({ look, vertical: true }), className)} {...props} />;
}
2 changes: 1 addition & 1 deletion src/components/primitives/Time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Time({ timestamp, prefix }: TimeProps) {
.replace(/\bsecond(s?)\b/g, "s")
.replace(/\bhour(s?)\b/g, "hours")
.replace(/\bday(s?)\b/g, "days")
.replace(/\bmonth(s?)\b/g, (match, plural) => (plural ? "months" : "month"));
.replace(/\bmonth(s?)\b/g, (_match, plural) => (plural ? "months" : "month"));
}, [timestamp, prefix]);

return time;
Expand Down

0 comments on commit 0b926a9

Please sign in to comment.