Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Create le rp application page
  • Loading branch information
regalijan committed Feb 11, 2025
1 parent 3902809 commit 61243df
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions app/routes/rpserver_.application.tsx
@@ -0,0 +1,88 @@
import {
Button,
Container,
FormControl,
FormLabel,
Heading,
Input,
NumberDecrementStepper,
NumberIncrementStepper,
NumberInput,
NumberInputField,
NumberInputStepper,
Textarea,
VStack,
} from "@chakra-ui/react";
import { useLoaderData } from "@remix-run/react";

export async function loader({ context }: { context: RequestContext }) {
const { current_user: user } = context.data;

if (!user.id)
throw new Response(null, {
status: 401,
});

if (await context.env.DATA.get(`rpserverblock_${user.id}`))
throw new Response(null, {
status: 403,
});

return null;
}

export default function () {
useLoaderData<typeof loader>();

return (
<Container maxW="container.md">
<Heading pb="32px">RP Server Application</Heading>
<VStack alignItems="start" spacing={12}>
<FormControl isRequired>
<FormLabel>Server Invite</FormLabel>
<Input maxLength={48} placeholder="https://discord.gg/abcdef123456" />
</FormControl>
<FormControl isRequired>
<FormLabel>Roblox Username</FormLabel>
<Input maxLength={20} placeholder="builderman" />
</FormControl>
<FormControl isRequired>
<FormLabel>How old are you?</FormLabel>
<NumberInput>
<NumberInputField />
<NumberInputStepper>
<NumberIncrementStepper />
<NumberDecrementStepper />
</NumberInputStepper>
</NumberInput>
</FormControl>
<FormControl isRequired>
<FormLabel>Introduce yourself!</FormLabel>
<Textarea
placeholder="Who are you? What do you enjoy doing? Write everything you want us to know about you."
rows={5}
/>
</FormControl>
<FormControl isRequired>
<FormLabel>What is your RP server about?</FormLabel>
<Input
maxLength={256}
placeholder="This can be just about anything tangentally related to CC2."
/>
</FormControl>
<FormControl>
<FormLabel>Explain the above in more details</FormLabel>
<Textarea
placeholder="What are your specific plans for your server?"
rows={5}
/>
</FormControl>
<FormControl>
<FormLabel>Anything else?</FormLabel>
<Textarea placeholder="Any questions or comments" rows={5} />
</FormControl>
<Button>Submit</Button>
</VStack>
</Container>
);
}

0 comments on commit 61243df

Please sign in to comment.