Skip to content

Commit

Permalink
fix: Handle async client creation and relax input type constraint
Browse files Browse the repository at this point in the history
- await createClient() call in feedback action
- Make type prop optional for Input component as it defaults to "text"
  • Loading branch information
brunocroh committed Feb 1, 2025
1 parent cb1b10d commit 33f280e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/room/[slug]/feedback/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { redirect } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'

export async function sendFeedback(formData: FormData) {
const supabase = createClient()
const supabase = await createClient()

const data = {
twitter: formData.get('twitter') as string,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { cn } from '@/lib/utils'

export type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
className?: string
type: string
type?: string
}

const Input = React.forwardRef<HTMLInputElement, InputProps>(
Expand Down

0 comments on commit 33f280e

Please sign in to comment.