Skip to content

Commit c7103aa

Browse files
authored
fix(ui): various fix (NangoHQ#2552)
## Describe your changes - Fix getLogsUrl when getting null for date - Fix button centering - Fix tooltip color for copy button
1 parent e11e069 commit c7103aa

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

packages/webapp/src/components/ui/button/Button.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button({ size
5151
}
5252

5353
return (
54-
<button
55-
ref={ref}
56-
className={cn(buttonStyles({ className, variant, size }), 'relative flex gap-2 items-center justify-center', isLoading && 'opacity-0')}
57-
{...props}
58-
>
54+
<button ref={ref} className={cn(buttonStyles({ variant, size }), 'relative flex gap-2 items-center', className, isLoading && 'opacity-0')} {...props}>
5955
{children}
6056
{isLoading && <Loader className="animate-spin flex inset-x-0 h-full" />}
6157
</button>

packages/webapp/src/components/ui/button/CopyButton.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export const CopyButton: React.FC<ClipboardButtonProps> = ({ text, iconType = 'c
4343
{iconType === 'link' ? <Link2Icon className={cn(`h-4`, className)} /> : <CopyIcon className={cn(`h-4 w-4`, className)} />}
4444
</Button>
4545
</TooltipTrigger>
46-
<TooltipContent sideOffset={10}>{tooltipText}</TooltipContent>
46+
<TooltipContent sideOffset={10} className="text-white">
47+
{tooltipText}
48+
</TooltipContent>
4749
</Tooltip>
4850
);
4951
};

packages/webapp/src/pages/Account/InviteSignup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const InviteSignup: React.FC = () => {
7272
</div>
7373
<div className="w-full">
7474
<Link to={'/signup'}>
75-
<Button className="w-full" size={'lg'}>
75+
<Button className="w-full justify-center" size={'lg'}>
7676
Back to signup
7777
</Button>
7878
</Link>

packages/webapp/src/pages/Connection/components/SyncRow.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const SyncRow: React.FC<{ sync: SyncResponse; connection: Connection; pro
7070
env,
7171
connections: connection?.connection_id,
7272
syncs: sync.name,
73-
day: new Date(sync.latest_sync?.updated_at)
73+
day: sync.latest_sync?.updated_at ? new Date(sync.latest_sync.updated_at) : null
7474
});
7575
}, [env, sync.name]);
7676

packages/webapp/src/utils/logs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function getLogsUrl(
1515
if (!val || key === 'env') {
1616
continue;
1717
}
18-
if (key === 'day') {
18+
if (key === 'day' && val) {
1919
const from = new Date(val);
2020
from.setHours(0, 0);
2121
const to = new Date(val);

0 commit comments

Comments
 (0)