diff --git a/src/components/Judging/ViewProject.jsx b/src/components/Judging/ViewProject.jsx index a07dc491..435f0893 100644 --- a/src/components/Judging/ViewProject.jsx +++ b/src/components/Judging/ViewProject.jsx @@ -36,6 +36,7 @@ const StyledYoutube = styled(Youtube)` const StyledP = styled(P)` margin: 1em 0; + color: ${p => p.theme.colors.text}; ` const StyledA = styled(A)` @@ -47,7 +48,8 @@ const StyledA = styled(A)` ` const ExternalLink = styled(A)` - color: ${p => 'white'}; + color: ${p => p.theme.colors.tertiaryHover}; + font-weight: bold; &:hover { color: ${p => p.theme.colors.tertiaryHover}; @@ -55,6 +57,7 @@ const ExternalLink = styled(A)` ` const StyledLabel = styled(Label)` + color: ${p => p.theme.colors.textSecondary}; display: block; margin: 1em 0 0.25em 0; ` @@ -134,7 +137,7 @@ const ViewProject = ({ project, score, error, success, isSubmitting, onChange, o Hacker Package diff --git a/src/pages/Judging/index.jsx b/src/pages/Judging/index.jsx index d531d52e..2d5c77ff 100644 --- a/src/pages/Judging/index.jsx +++ b/src/pages/Judging/index.jsx @@ -16,21 +16,19 @@ const StyledJudgingCard = styled(JudgingCard)` const getProjects = async (userId, projectId, dbHackathonName) => { const getAndAssignProjects = async () => { try { - return db.runTransaction(async transaction => { - const projectDocs = await transaction.get( - projectsRef(dbHackathonName) - .where('draftStatus', '==', 'public') - .orderBy('countAssigned') - .limit(PROJECTS_TO_JUDGE_COUNT + 1) // get an extra in case we got our own project - ) + const projectSnapshot = await projectsRef(dbHackathonName) + .where('draftStatus', '==', 'public') + .orderBy('countAssigned') + .limit(PROJECTS_TO_JUDGE_COUNT + 1) + .get() - let projectIds = projectDocs.docs.map(project => project.id) - projectIds = projectIds.filter(id => id !== projectId) - if (projectIds.length > PROJECTS_TO_JUDGE_COUNT) { - projectIds.pop() - } + let projectIds = projectSnapshot.docs.map(project => project.id) + projectIds = projectIds.filter(id => id !== projectId) + if (projectIds.length > PROJECTS_TO_JUDGE_COUNT) { + projectIds.pop() + } - // increment assigned counters + await db.runTransaction(async transaction => { projectIds.forEach(projectId => { const projectRef = projectsRef(dbHackathonName).doc(projectId) transaction.update(projectRef, { @@ -43,8 +41,9 @@ const getProjects = async (userId, projectId, dbHackathonName) => { transaction.update(applicantRef, { projectsAssigned: projectIds, }) - return projectIds }) + + return projectIds } catch (error) { console.error('Error assigning projects:', error) } diff --git a/src/utility/Constants.js b/src/utility/Constants.js index c96cd911..95876cc7 100644 --- a/src/utility/Constants.js +++ b/src/utility/Constants.js @@ -106,9 +106,9 @@ export const JUDGING_RUBRIC = [ // ------------------ HC { id: 'presentation', - label: 'Presentation', + label: 'Presentation/Pitch', description: - 'Is the presentation well-prepared and smooth? Does it make a good business case for the project? Are statistics used when relevant?', + 'Is the presentation or pitch is well-prepared and smooth? Does it make a good business case for the project? Are statistics used when relevant?', value: 5, // weight: 3 / 18, weight: 1 / 4,