Skip to content

Commit

Permalink
reformatted with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
suxls committed Feb 20, 2025
1 parent d1f0cfa commit 06479e7
Show file tree
Hide file tree
Showing 3 changed files with 12,466 additions and 6,786 deletions.
13 changes: 7 additions & 6 deletions apps/web/src/app/_components/form/review-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,17 @@ export function ReviewForm(props: ReviewFormProps) {
);

const canReviewForTerm = (): boolean => {
if (!reviews.data) return false;
const currentTerm = form.getValues("workTerm");
if (!reviews.data) return false;

const currentTerm = form.getValues("workTerm");
const currentYear = form.getValues("workYear");

const reviewsForCurrentTerm = reviews.data.filter(
review => String(review.workTerm) === currentTerm
&& review.workYear === Number(currentYear)
(review) =>
String(review.workTerm) === currentTerm &&
review.workYear === Number(currentYear),
);

return reviewsForCurrentTerm.length < 2;
};

Expand Down
7 changes: 5 additions & 2 deletions apps/web/src/app/_components/form/submission-failure.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from "next/link";

import { Button } from "@cooper/ui/button";

interface SubmissionFailureProps {
Expand All @@ -10,7 +11,9 @@ export function SubmissionFailure({ message }: SubmissionFailureProps) {
<div className="flex flex-col border-2">
<div className="z-10 -mb-4 h-4 w-full rounded-t-xl bg-gradient-to-r from-rose-400 via-yellow-400 to-blue-600" />
<div className="flex h-[80vh] w-full flex-col items-center justify-center space-y-6 rounded-xl bg-white px-8 py-32 text-cooper-blue-600">
<div className="text-5xl font-bold">Whoops, your review is invalid...</div>
<div className="text-5xl font-bold">
Whoops, your review is invalid...
</div>
<div className="max-w-3xl text-center text-2xl">
{message ? message : "Something went wrong. Please try again."}
</div>
Expand All @@ -22,4 +25,4 @@ export function SubmissionFailure({ message }: SubmissionFailureProps) {
</div>
</div>
);
}
}
Loading

0 comments on commit 06479e7

Please sign in to comment.