ApplyForm.tsx — astro Source File
Architecture documentation for ApplyForm.tsx, a tsx file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR ed5af1ac_b7b5_7a73_06a4_846587e5f094["ApplyForm.tsx"] 58a2600d_f5df_9651_e0d8_9010ddeef24d["astro:actions"] ed5af1ac_b7b5_7a73_06a4_846587e5f094 --> 58a2600d_f5df_9651_e0d8_9010ddeef24d d9988dd0_c044_f9d2_85cd_a31a0a2bdf80["react"] ed5af1ac_b7b5_7a73_06a4_846587e5f094 --> d9988dd0_c044_f9d2_85cd_a31a0a2bdf80 style ed5af1ac_b7b5_7a73_06a4_846587e5f094 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { actions, isInputError } from 'astro:actions';
import { useState } from 'react';
export function ApplyForm() {
const [result, setResult] = useState<any>(null);
return (
<form
method="POST"
data-testid="apply-form"
action={actions.blog.apply.toString()}
onSubmit={async (e) => {
e.preventDefault();
const form = e.target as HTMLFormElement;
const formData = new FormData(form);
const { data, error } = await actions.blog.apply(formData);
if (error) {
console.error('Error:', error);
} else {
setResult(data);
form.reset();
}
}}
>
<label htmlFor="name">Name</label>
<input id="name" type="text" name="name" placeholder="Your name" />
<label htmlFor="email">Email</label>
<input id="email" type="email" name="email" placeholder="your.email@example.com" />
<button type="submit">Submit</button>
{result && (
<div data-testid="result">
<p>Submitted: {result.name} ({result.email})</p>
</div>
)}
</form>
);
}
Domain
Subdomains
Functions
Dependencies
- astro:actions
- react
Source
Frequently Asked Questions
What does ApplyForm.tsx do?
ApplyForm.tsx is a source file in the astro codebase, written in tsx. It belongs to the E2ETesting domain, TestFixtures subdomain.
What functions are defined in ApplyForm.tsx?
ApplyForm.tsx defines 1 function(s): ApplyForm.
What does ApplyForm.tsx depend on?
ApplyForm.tsx imports 2 module(s): astro:actions, react.
Where is ApplyForm.tsx in the architecture?
ApplyForm.tsx is located at packages/astro/e2e/fixtures/actions-blog/src/components/ApplyForm.tsx (domain: E2ETesting, subdomain: TestFixtures, directory: packages/astro/e2e/fixtures/actions-blog/src/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free