Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Tweak spacing

Tim Wilson2b25eaa4d690
diff --git a/apps/web/ui/modals/add-edit-link-modal-new/index.tsx b/apps/web/ui/modals/add-edit-link-modal-new/index.tsx
index 493b9fbe3a..da168f0d8c 100644
--- a/apps/web/ui/modals/add-edit-link-modal-new/index.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal-new/index.tsx
@@ -263,80 +263,78 @@ export function AddEditLinkModal({
<div className="grid max-h-[95dvh] w-full gap-y-6 md:grid-cols-[2fr_1fr] md:overflow-hidden">
<div className="scrollbar-hide px-6 md:overflow-auto">
- <div className="grid gap-6 py-4">
- <div className="grid gap-6">
- <Controller
- name="url"
- control={control}
- render={({ field }) => (
- <DestinationUrlInput
- domain={domain}
- _key={key}
- value={field.value}
- domains={domains}
- onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
- clearErrors("url");
- field.onChange(e.target.value);
- }}
- required={key !== "_root"}
- error={errors.url?.message || undefined}
- showEnterToSubmit={false}
- />
- )}
- />
-
- {key !== "_root" && (
- <ShortLinkInput
- ref={keyRef}
+ <div className="grid gap-8 py-4">
+ <Controller
+ name="url"
+ control={control}
+ render={({ field }) => (
+ <DestinationUrlInput
domain={domain}
_key={key}
- existingLinkProps={props}
- error={errors.key?.message || undefined}
- onChange={(d) => {
- clearErrors("key");
- if (d.domain !== undefined) setValue("domain", d.domain);
- if (d.key !== undefined) setValue("key", d.key);
- }}
- data={data}
- saving={isSubmitting || isSubmitSuccessful}
- loading={loading}
+ value={field.value}
domains={domains}
+ onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
+ clearErrors("url");
+ field.onChange(e.target.value);
+ }}
+ required={key !== "_root"}
+ error={errors.url?.message || undefined}
+ showEnterToSubmit={false}
/>
)}
+ />
- <div>
- <div className="flex items-center gap-2">
- <label
- htmlFor="comments"
- className="block text-sm font-medium text-gray-700"
- >
- Comments
- </label>
- <InfoTooltip
- content={
- <SimpleTooltipContent
- title="Use comments to add context to your short links – for you and your team."
- cta="Learn more."
- href="https://dub.co/help/article/link-comments"
- />
- }
- />
- </div>
- <Controller
- name="comments"
- control={control}
- render={({ field }) => (
- <TextareaAutosize
- name="comments"
- minRows={3}
- className="mt-2 block w-full rounded-md border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm"
- placeholder="Add comments"
- value={field.value ?? ""}
- onChange={(e) => field.onChange(e.target.value)}
+ {key !== "_root" && (
+ <ShortLinkInput
+ ref={keyRef}
+ domain={domain}
+ _key={key}
+ existingLinkProps={props}
+ error={errors.key?.message || undefined}
+ onChange={(d) => {
+ clearErrors("key");
+ if (d.domain !== undefined) setValue("domain", d.domain);
+ if (d.key !== undefined) setValue("key", d.key);
+ }}
+ data={data}
+ saving={isSubmitting || isSubmitSuccessful}
+ loading={loading}
+ domains={domains}
+ />
+ )}
+
+ <div>
+ <div className="flex items-center gap-2">
+ <label
+ htmlFor="comments"
+ className="block text-sm font-medium text-gray-700"
+ >
+ Comments
+ </label>
+ <InfoTooltip
+ content={
+ <SimpleTooltipContent
+ title="Use comments to add context to your short links – for you and your team."
+ cta="Learn more."
+ href="https://dub.co/help/article/link-comments"
/>
- )}
+ }
/>
</div>
+ <Controller
+ name="comments"
+ control={control}
+ render={({ field }) => (
+ <TextareaAutosize
+ name="comments"
+ minRows={3}
+ className="mt-2 block w-full rounded-md border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm"
+ placeholder="Add comments"
+ value={field.value ?? ""}
+ onChange={(e) => field.onChange(e.target.value)}
+ />
+ )}
+ />
</div>
</div>
</div>