Skip to content

Commit

Permalink
Add discord username to application
Browse files Browse the repository at this point in the history
  • Loading branch information
pogseal committed Aug 22, 2024
1 parent c77b3a8 commit 16e8f81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
11 changes: 6 additions & 5 deletions app/routes/_site+/apply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ export default function Apply() {
)}
</div>
</div>
{application?.reviewMessage && (
{application?.reviewMessage ? (
<div className="py-3 px-4 text-sm rounded-xl border border-color-sub bg-2-sub shadow-sm dark:shadow-zinc-800/50 mb-6">
<div className="text-1 text-xs pb-1">Reviewer reply:</div>
{application?.reviewMessage}
<div className="text-1 text-xs pb-1">Reviewer reply</div>
{`${application?.reviewMessage}`}
</div>
)}
) : undefined}
<fetcher.Form method="post" ref={zo.ref}>
<FieldGroup>
<Field
Expand Down Expand Up @@ -182,7 +182,7 @@ export async function action({
switch (intent) {
case "createApplication": {
try {
const { siteId, primaryDetails, additionalNotes } =
const { siteId, primaryDetails, additionalNotes, discordUsername } =
await zx.parseForm(request, SiteApplicationSchema);
return await payload.create({
collection: "siteApplications",
Expand All @@ -191,6 +191,7 @@ export async function action({
primaryDetails: primaryDetails as any,
additionalNotes: additionalNotes as any,
createdBy: user.id as any,
discordUsername: discordUsername,
site: siteId as any,
status: "under-review",
},
Expand Down
8 changes: 4 additions & 4 deletions app/routes/_site+/settings+/components/ApplicationViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@ export function ApplicationViewer({
<div className="text-1 text-sm pb-1 font-semibold">
Discord Username
</div>
<div>{application.discordUsername}</div>
<div>{application.discordUsername ?? "-"}</div>
</div>
<div>
<div className="text-1 text-sm pb-1 font-semibold">
In what ways would you like to help?
</div>
<div>{application.primaryDetails}</div>
<div>{application.primaryDetails ?? "-"}</div>
</div>
<div>
<div className="text-1 text-sm pb-1 font-semibold">
Anything else you'd like to share?
</div>
<div>{application.additionalNotes}</div>
<div>{application.additionalNotes ?? "-"}</div>
</div>
</div>
<div className="border-t border-color -mx-5 px-5 pt-5">
Expand All @@ -99,7 +99,7 @@ export function ApplicationViewer({
<div className="text-1 pb-1 text-sm font-semibold">
Review Notes
</div>
<div>{application.reviewMessage}</div>
<div>{application.reviewMessage ?? "-"}</div>
</div>
) : (
<fetcher.Form method="post" ref={zo.ref}>
Expand Down
1 change: 0 additions & 1 deletion app/routes/_site+/settings+/team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { zx } from "zodix";

import { Avatar } from "~/components/Avatar";
import { DotLoader } from "~/components/DotLoader";
import { H2Plain } from "~/components/Headers";
import {
Table,
TableBody,
Expand Down

0 comments on commit 16e8f81

Please sign in to comment.