Skip to content

Commit 683a4c1

Browse files
Merge branch 'dev' into fix/console-errors
2 parents 77a389c + 9b29a32 commit 683a4c1

File tree

21 files changed

+112
-76
lines changed

21 files changed

+112
-76
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npx lint-staged
4+
npx lint-staged && npm run check-branch-name

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ More on the [Conventional commits](https://www.conventionalcommits.org/en/v1.0.0
88

99
<br>
1010

11-
# Components conventions
11+
## Components conventions
1212

1313
1. Use `functional components` instead of arrow components
1414
2. For typescript, use `interface` for props, and types if needed.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ yarn start
6262

6363
```bash
6464
git clone https://github.com/dacadeorg/dacade-frontend-app.git
65+
cd dacade-frontend-app
6566
```
6667

6768
### 2. Install Dependencies

check_branch_name.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
local_branch_name="$(git rev-parse --abbrev-ref HEAD)"
3+
4+
# This regular expression is:
5+
# 1. checking for branch Names: "dev" or "main"
6+
# - ^(dev|main)$)
7+
# 2. checking for branch Name starting with fix,ft,ht,chore or doc follwed by a "/" then the "branch name"
8+
# - ^((fix|ft|ht|chore|doc)\/[a-zA-Z0-9\-]+)$
9+
valid_branch_regex='^(dev|main)$|^((fix|ft|ht|chore|doc)\/[a-zA-Z0-9\-]+)$'
10+
11+
green='\033[0;32m'
12+
red='\033[0;31m'
13+
clear='\033[0m'
14+
15+
message="❌❌❌❌ Error: The branch name $local_branch_name does not adhere to the project guidelines.\nPlease refer to the CONTRIBUTING guide for the correct format.\nYour commit will be rejected. Rename your branch to a valid name and try again."
16+
17+
if [[ ! $local_branch_name =~ $valid_branch_regex ]]; then
18+
echo -e "${red}$message${clear}"
19+
exit 1
20+
fi
21+
22+
echo -e "${green}Branch name check passed ✅${clear}"
23+
exit 0

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"start": "next start",
99
"lint": "eslint --ignore-path .eslintignore \"./**/*.{ts,tsx,js}\"",
1010
"prettier-format": "prettier --config .prettierrc 'src/**/*.{ts,tsx,js,jsx}' --write",
11-
"postinstall": "chmod +x .husky/*"
11+
"check-branch-name": "./check_branch_name.sh",
12+
"prepare": "npx husky install && chmod +x .husky/* && chmod +x ./check_branch_name.sh"
1213
},
1314
"dependencies": {
1415
"@coingecko/cryptoformat": "^0.5.4",

public/locales/bg/common.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
"communities.challenge.evaluation.total": "Total",
150150
"communities.challenge.evaluation.points": "Points",
151151
"communities.challenge.evaluation.message": "Congratulations you gained at least 70% of the available learning points.",
152+
"communities.challenge.evaluation.message.nominated": "Поздравления, печеленето на 90% ви номинира за наградния фонд от:",
152153
"communities.submission.title": "Submissions",
153154
"communities.feedbacks": "Feedbacks",
154155
"communities.navigation.overview": "Преглед",
@@ -167,6 +168,7 @@
167168
"communities.overview.courses.description": "In the courses of this community, you will be able to learn about new technologies, solve challenges, get feedback and earn bounties.",
168169
"communities.overview.scoreboard.title": "Scoreboard",
169170
"communities.overview.scoreboard.description": "On the scoreboard, you can see which users have accumulated the most reputation by giving valuable feedback to their peers.",
171+
"communities.scoreboard.empty-state.title": "Няма оценки за тази категория.",
170172
"communities.card.estimated": "Estimated Time",
171173
"communities.card.earn": "Earn rewards",
172174
"communities.card.submissions": "{{count}} Изявления",

public/locales/en/common.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"communities.challenge.evaluation.total": "Total",
151151
"communities.challenge.evaluation.points": "Points",
152152
"communities.challenge.evaluation.message": "Congratulations you gained at least 70% of the available learning points.",
153+
"communities.challenge.evaluation.message.nominated": "Congratulations, earning 90% nominates you for the prize pool of:",
153154
"communities.submission.title": "Submissions",
154155
"communities.feedbacks": "Feedbacks",
155156
"communities.navigation.overview": "Overview",
@@ -170,6 +171,7 @@
170171
"communities.overview.courses.description": "In the courses of this community, you will be able to learn about new technologies, solve challenges, get feedback and earn bounties.",
171172
"communities.overview.scoreboard.title": "Scoreboard",
172173
"communities.overview.scoreboard.description": "On the scoreboard, you can see which users have accumulated the most reputation by giving valuable feedback to their peers.",
174+
"communities.scoreboard.empty-state.title": "No scores for this category",
173175
"communities.card.estimated": "Estimated Time",
174176
"communities.card.earn": "Earn rewards",
175177
"communities.card.submissions": "{{count}} Submissions",

public/locales/es/common.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
"communities.challenge.evaluation.total": "Total",
154154
"communities.challenge.evaluation.points": "Puntos",
155155
"communities.challenge.evaluation.message": "¡Felicidades, ha ganado al menos el 70% de los puntos disponibles!",
156+
"communities.challenge.evaluation.message.nominated": "Felicitaciones, ganar el 90% te nominó para el fondo de premios de:",
156157
"communities.submission.title": "Propuestas",
157158
"communities.feedbacks": "Feedbacks",
158159
"communities.navigation.overview": "Vista general",
@@ -170,6 +171,7 @@
170171
"communities.overview.courses.description": "En los cursos de esta comunidad, podrá aprender sobre nuevas tecnologías, resolver retos, recibir feedbacks y ganar premios.",
171172
"communities.overview.scoreboard.title": "Tabla de Resultados",
172173
"communities.overview.scoreboard.description": "En la tabla de resultados, puede ver qué usuarios han acumulado la mejor reputación dando su valioso feedback a sus compañeras.",
174+
"communities.scoreboard.empty-state.title": "No hay puntuaciones para esta categoría.",
173175
"communities.card.estimated": "Tiempo estimado",
174176
"communities.card.earn": "Gane recompensas",
175177
"communities.card.submissions": "{{count}} Envíos",

public/locales/hr/common.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
"communities.challenge.evaluation.total": "Total",
137137
"communities.challenge.evaluation.points": "Points",
138138
"communities.challenge.evaluation.message": "Congratulations you gained at least 70% of the available learning points.",
139+
"communities.challenge.evaluation.message.nominated": "Čestitamo, osvajanje 90% nominira vas za nagradni fond od:",
139140
"communities.submission.title": "Submissions",
140141
"communities.feedbacks": "Feedbacks",
141142
"communities.navigation.overview": "Pregled",
@@ -154,6 +155,7 @@
154155
"communities.overview.courses.description": "In the courses of this community, you will be able to learn about new technologies, solve challenges, get feedback and earn bounties.",
155156
"communities.overview.scoreboard.title": "Scoreboard",
156157
"communities.overview.scoreboard.description": "On the scoreboard, you can see which users have accumulated the most reputation by giving valuable feedback to their peers.",
158+
"communities.scoreboard.empty-state.title": "Nema bodova za ovu kategoriju.",
157159
"communities.card.estimated": "Estimated Time",
158160
"communities.card.earn": "Earn rewards",
159161
"communities.overview.challenge.rewards": "Nagrade",

src/components/cards/Scoreboard.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ interface ScoreboardCardProps {
1414
feedbacks: number;
1515
score: number;
1616
submissions: number;
17+
submissionPoints: number;
1718
};
1819
index: number;
1920
}
@@ -42,8 +43,8 @@ export default function ScoreboardCard({ value, index }: ScoreboardCardProps): J
4243
<span>{value.submissions === 1 ? "Submission" : "Submissions"}</span>
4344
</p>
4445
<p className="whitespace-nowrap sm:px-4 px-3 text-xs space-x-1">
45-
<span>{value.score}</span>
46-
<span>{value.score === 1 ? "Total Point" : "Total Points"}</span>
46+
<span>{value.submissionPoints}</span>
47+
<span>{value.submissionPoints === 1 ? "Submission Point" : "Submission Points"}</span>
4748
</p>
4849
<p className="whitespace-nowrap text-xs sm:px-4 px-3 space-x-1">
4950
<span>{value.feedbacks}</span>

0 commit comments

Comments
 (0)