Skip to content

Commit

Permalink
comments dev
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenJLu committed Jan 4, 2025
1 parent dc76691 commit d6fa8df
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions app/routes/r2-test/r2-worker-test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect } from 'react';
import { useEffect, useState } from 'react';
import { Turnstile } from '~/components/turnstile/turnstile';
import { verifyTurnstileToken } from '~/utils/turnstile';
import { Form, useActionData, useLoaderData, useNavigate } from '@remix-run/react';
Expand Down Expand Up @@ -93,6 +93,8 @@ export const R2WorkerTest = () => {
const comments = loaderData?.comments || [];
const navigate = useNavigate();
const actionData = useActionData<ActionData>();
const [name, setName] = useState('');
const [comment, setComment] = useState('');

const formatDate = (dateString: string) => {
return new Date(dateString).toLocaleString();
Expand All @@ -119,38 +121,31 @@ export const R2WorkerTest = () => {
maxWidth: '600px',
marginTop: '2rem'
}}>
<Input
<Input
required
label="Name"
name="name"
id="name"
error={actionData?.errors?.name}
value=""
value={name}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setName(e.target.value)}
multiline={false}
className=""
style={{}}
onBlur={() => {}}
autoComplete="off"
maxLength={255}
type="text"
onChange={() => {}}
/>
autoComplete="off" className={undefined} style={undefined} onBlur={undefined} />
<Input
required
label="Comment"
name="comment"
id="comment"
multiline
error={actionData?.errors?.comment}
value=""
className=""
style={{}}
onBlur={() => {}}
autoComplete="off"
value={comment}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setComment(e.target.value)}
maxLength={255}
type="text"
onChange={() => {}}
/>
autoComplete="off" className={undefined} style={undefined} onBlur={undefined} />
<br />
<Turnstile
theme="dark"
style={{ marginBottom: '1rem' }}
Expand Down

0 comments on commit d6fa8df

Please sign in to comment.