mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix(landing): inset careers row hover, drop trusted-by section, gate contact submit (#5380)
This commit is contained in:
@@ -9,7 +9,6 @@ import {
|
||||
JobGroups,
|
||||
} from '@/app/(landing)/careers/components/job-board'
|
||||
import { careersSearchParamsCache } from '@/app/(landing)/careers/search-params'
|
||||
import { TrustedBy } from '@/app/(landing)/components/trusted-by'
|
||||
|
||||
interface CareersProps {
|
||||
searchParams: Promise<SearchParams>
|
||||
@@ -87,8 +86,6 @@ export default async function Careers({ searchParams }: CareersProps) {
|
||||
>
|
||||
<JobBoard postings={postings} />
|
||||
</Suspense>
|
||||
|
||||
<TrustedBy className='pt-6' />
|
||||
</section>
|
||||
</main>
|
||||
)
|
||||
|
||||
@@ -83,8 +83,8 @@ function JobRow({ posting }: JobRowProps) {
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className={cn(
|
||||
'group flex items-center justify-between gap-6 border-[var(--border)] border-t py-5',
|
||||
'transition-colors hover:bg-[var(--surface-hover)]'
|
||||
'-mx-3 group flex items-center justify-between gap-6 rounded-lg border-[var(--border)]',
|
||||
'border-t px-3 py-5 transition-colors hover:bg-[var(--surface-hover)]'
|
||||
)}
|
||||
>
|
||||
<div className='flex min-w-0 flex-col gap-1.5'>
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
} from '@/lib/api/contracts/contact'
|
||||
import { flattenFieldErrors } from '@/lib/api/contracts/primitives'
|
||||
import { getEnv } from '@/lib/core/config/env'
|
||||
import { quickValidateEmail } from '@/lib/messaging/email/validation'
|
||||
import { captureClientEvent } from '@/lib/posthog/client'
|
||||
import { useSubmitContact } from '@/hooks/queries/contact'
|
||||
|
||||
@@ -175,6 +176,13 @@ export function ContactForm() {
|
||||
)
|
||||
}
|
||||
|
||||
const canSubmit =
|
||||
quickValidateEmail(form.email.trim()).isValid &&
|
||||
form.name.trim().length > 0 &&
|
||||
form.topic.length > 0 &&
|
||||
form.subject.trim().length > 0 &&
|
||||
form.message.trim().length > 0
|
||||
|
||||
const isBusy = contactMutation.isPending || isSubmitting
|
||||
|
||||
const submitError = contactMutation.isError
|
||||
@@ -336,7 +344,7 @@ export function ContactForm() {
|
||||
variant='primary'
|
||||
flush
|
||||
fullWidth
|
||||
disabled={isBusy}
|
||||
disabled={isBusy || !canSubmit}
|
||||
className='mt-1 justify-center [&>span]:flex-none'
|
||||
>
|
||||
{isBusy ? 'Sending…' : 'Send message'}
|
||||
|
||||
Reference in New Issue
Block a user