-
Notifications
You must be signed in to change notification settings - Fork 49
feat: introduce gamification badges for EOD streaks #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| export type BadgeVariant = "bronze" | "silver" | "gold"; | ||
|
|
||
| export type EarnedBadge = { | ||
| slug: string; | ||
| name: string; | ||
| variant: BadgeVariant; | ||
| }; | ||
|
Comment on lines
+3
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion | π Major | β‘ Quick win Use This object shape should be declared as an Proposed fix-export type EarnedBadge = {
+export interface EarnedBadge {
slug: string;
name: string;
variant: BadgeVariant;
-};
+}As per coding guidelines, |
||
|
|
||
| // EOD Streak Thresholds (consecutive days with points > 0) | ||
| export const STREAK_THRESHOLDS = { | ||
| BRONZE: 5, | ||
| SILVER: 10, | ||
| GOLD: 15, | ||
| } as const; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import "./.next/types/routes.d.ts"; | ||
| import "./.next/dev/types/routes.d.ts"; | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hide decorative Flame icon from assistive tech.
This icon is decorative next to the badge label; set
aria-hidden="true"(and optionallyfocusable="false").