Skip to content

Commit 7dbabec

Browse files
authored
Merge branch 'main' into refactor/move-to-marble-sdk
2 parents f71d9fe + 9a1e709 commit 7dbabec

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

apps/dashboard/app/(main)/organizations/components/organizations-list.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import {
4141
} from '@/hooks/use-organizations';
4242
import { cn, getOrganizationInitials } from '@/lib/utils';
4343
import { EmptyState } from './empty-state';
44-
import { ListSkeleton } from './list-skeleton';
4544

4645
dayjs.extend(relativeTime);
4746

apps/dashboard/components/organizations/create-organization-dialog.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ export function CreateOrganizationDialog({
7676
metadata: {},
7777
});
7878
const [slugManuallyEdited, setSlugManuallyEdited] = useState(false);
79+
const [touchedFields, setTouchedFields] = useState<{
80+
name: boolean;
81+
slug: boolean;
82+
}>({
83+
name: false,
84+
slug: false,
85+
});
7986

8087
// Image upload state
8188
const [preview, setPreview] = useState<string | null>(null);
@@ -106,6 +113,7 @@ export function CreateOrganizationDialog({
106113
setPreview(null);
107114
setLogoFile(null);
108115
setSlugManuallyEdited(false);
116+
setTouchedFields({ name: false, slug: false });
109117
resetCropState();
110118
setIsCropModalOpen(false);
111119
};
@@ -299,16 +307,19 @@ export function CreateOrganizationDialog({
299307
</Label>
300308
{(() => {
301309
const isNameValid = formData.name.trim().length >= 2;
310+
const hasUserTyped = formData.name.length > 0;
311+
const shouldShowError = (touchedFields.name || hasUserTyped) && !isNameValid;
302312
return (
303313
<>
304314
<Input
305315
aria-describedby="org-name-help"
306-
aria-invalid={!isNameValid}
316+
aria-invalid={shouldShowError}
307317
className={`rounded border-border/50 focus:border-primary/50 focus:ring-primary/20 ${
308-
isNameValid ? '' : 'border-destructive'
318+
shouldShowError ? 'border-destructive' : ''
309319
}`}
310320
id="org-name"
311321
maxLength={100}
322+
onBlur={() => setTouchedFields(prev => ({ ...prev, name: true }))}
312323
onChange={(e) =>
313324
setFormData((prev) => ({
314325
...prev,
@@ -340,16 +351,19 @@ export function CreateOrganizationDialog({
340351
const isSlugValid =
341352
SLUG_ALLOWED_REGEX.test(formData.slug || '') &&
342353
(formData.slug || '').trim().length >= 2;
354+
const hasUserTyped = (formData.slug || '').length > 0;
355+
const shouldShowError = (touchedFields.slug || hasUserTyped) && !isSlugValid;
343356
return (
344357
<>
345358
<Input
346359
aria-describedby="org-slug-help"
347-
aria-invalid={!isSlugValid}
360+
aria-invalid={shouldShowError}
348361
className={`rounded border-border/50 focus:border-primary/50 focus:ring-primary/20 ${
349-
isSlugValid ? '' : 'border-destructive'
362+
shouldShowError ? 'border-destructive' : ''
350363
}`}
351364
id="org-slug"
352365
maxLength={50}
366+
onBlur={() => setTouchedFields(prev => ({ ...prev, slug: true }))}
353367
onChange={(e) => handleSlugChange(e.target.value)}
354368
placeholder="e.g., acme-corp"
355369
value={formData.slug}

apps/docs/components/landing/hero.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
'use client';
22

33
import dynamic from 'next/dynamic';
4-
import Image from 'next/image';
5-
import { useTheme } from 'next-themes';
64
import DemoContainer from './demo';
75
import { SciFiButton } from './scifi-btn';
86
import { Spotlight } from './spotlight';
@@ -28,8 +26,6 @@ export default function Hero() {
2826
}
2927
};
3028

31-
const { resolvedTheme } = useTheme();
32-
const isDarkMode = resolvedTheme === 'dark';
3329

3430
return (
3531
<section className="relative flex min-h-[100svh] w-full flex-col items-center overflow-hidden">
@@ -39,21 +35,6 @@ export default function Hero() {
3935
<div className="grid grid-cols-1 items-center gap-8 pt-12 pb-6 sm:pt-16 sm:pb-8 lg:grid-cols-2 lg:gap-12 lg:pt-20 lg:pb-12 xl:gap-16">
4036
{/* Text Content */}
4137
<div className="order-2 flex flex-col items-center gap-6 text-center lg:order-1 lg:items-start lg:gap-8 lg:text-left">
42-
<div>
43-
<a
44-
className="block transition-transform hover:scale-105"
45-
href="https://www.producthunt.com/products/databuddy-analytics"
46-
rel="noopener noreferrer"
47-
target="_blank"
48-
>
49-
<Image
50-
alt="Databuddy Analytics on Product Hunt"
51-
height={40}
52-
src={`https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1021633&theme=${isDarkMode ? 'dark' : 'light'}`}
53-
width={250}
54-
/>
55-
</a>
56-
</div>
5738
<div className="self-center lg:self-start">
5839
<div className="inline-flex items-center rounded-full border border-border bg-background/80 px-3 py-1 font-medium text-muted-foreground text-xs shadow backdrop-blur">
5940
<span>Rejected by</span>

0 commit comments

Comments
 (0)