diff --git a/src/app/roles/page.tsx b/src/app/roles/page.tsx index 822ef95..d8b8c2a 100644 --- a/src/app/roles/page.tsx +++ b/src/app/roles/page.tsx @@ -5,6 +5,10 @@ import { api } from "~/trpc/server"; import { unstable_noStore as noStore } from "next/cache"; export default async function Roles() { + /** + * FIXME: This is a temporary fix, figure out how to get build command working without noStore(); + * @returns A promise containing the roles from the database + */ async function getRoles() { noStore(); const roles = await api.role.list.query(); diff --git a/src/components/role-review-card.tsx b/src/components/role-review-card.tsx index b805590..338a720 100644 --- a/src/components/role-review-card.tsx +++ b/src/components/role-review-card.tsx @@ -57,7 +57,7 @@ export async function RoleReviewCard({ roleObj, ...props }: RoleReviewCardProps) { - // Get all of the information needed from the corresponding company + // ===== COMPANY DATA ===== // const company = await api.company.getById.query({ id: roleObj.companyId }); const roleDescription = roleObj.description && roleObj.description.length >= 210 @@ -65,7 +65,7 @@ export async function RoleReviewCard({ : roleObj.description; const positionDate: string = formatDate(company.createdAt); - // Get all of the information needed from the corresponding reviews + // ===== REVIEW DATA ===== // const reviews = await api.review.getByRole.query({ roleId: roleObj.id }); const reviewCount = reviews.length; let workEnvironment = "In Person"; @@ -77,8 +77,9 @@ export async function RoleReviewCard({ workEnvironment = "Remote"; } } - // Calculate average total review - // TODO: abstract? + + // ===== AVERAGE RATING ===== // + // TODO: Abstract? const totalStars = reviews.reduce((accum, curr) => { return accum + curr.overallRating; }, 0);