-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #787 from hackclub/add-cursed-blessed-status
Display the blessed/cursed status for users
- Loading branch information
Showing
4 changed files
with
146 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
'use client' | ||
|
||
import { useState } from 'react' | ||
|
||
import Pill from '@/components/ui/pill' | ||
import { | ||
Popover, | ||
PopoverTrigger, | ||
PopoverContent, | ||
} from '@/components/ui/popover' | ||
import Icon from '@hackclub/icons' | ||
|
||
export default function Blessed() { | ||
const [open, setOpen] = useState(false) | ||
|
||
return ( | ||
<Popover open={open} onOpenChange={setOpen}> | ||
<PopoverTrigger | ||
asChild | ||
onMouseEnter={() => setOpen(true)} | ||
onMouseLeave={() => setOpen(false)} | ||
> | ||
<div className="text-center mb-5"> | ||
<Pill msg="🏴☠️ You have the pirate's blessing" color="yellow" /> | ||
</div> | ||
</PopoverTrigger> | ||
<PopoverContent className="text-sm"> | ||
<div> | ||
<p className="inline-flex text-base">What's a blessing?</p> | ||
<ul className="flex flex-col gap-1 mt-2"> | ||
<li className="flex gap-1"> | ||
<Icon | ||
glyph="thumbsup" | ||
size={20} | ||
className="inline flex-shrink-0" | ||
/>{' '} | ||
Be thoughtful with your voting. | ||
</li> | ||
<li className="flex gap-1"> | ||
<Icon | ||
glyph="message-new" | ||
size={20} | ||
className="inline flex-shrink-0" | ||
/>{' '} | ||
Write good descriptions. | ||
</li> | ||
<li className="flex gap-1"> | ||
<Icon glyph="friend" size={20} className="inline flex-shrink-0" />{' '} | ||
Keep voting regularly. | ||
</li> | ||
<li className="flex gap-1"> | ||
<img | ||
sizes="20px" | ||
src="doubloon.svg" | ||
alt="doubloons" | ||
className="w-4 sm:w-5 h-4 sm:h-5" | ||
/>{' '} | ||
While you keep your voting streak, you'll earn 20% more doubloons! | ||
</li> | ||
</ul> | ||
</div> | ||
</PopoverContent> | ||
</Popover> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
'use client' | ||
|
||
import { useState } from 'react' | ||
|
||
import Pill from '@/components/ui/pill' | ||
import { | ||
Popover, | ||
PopoverTrigger, | ||
PopoverContent, | ||
} from '@/components/ui/popover' | ||
import Icon from '@hackclub/icons' | ||
|
||
export default function Cursed() { | ||
const [open, setOpen] = useState(false) | ||
|
||
return ( | ||
<Popover open={open} onOpenChange={setOpen}> | ||
<PopoverTrigger | ||
asChild | ||
onMouseEnter={() => setOpen(true)} | ||
onMouseLeave={() => setOpen(false)} | ||
> | ||
<div className="text-center mb-5"> | ||
<Pill msg="️☠️ You have the pirate's curse" color="red" /> | ||
</div> | ||
</PopoverTrigger> | ||
<PopoverContent className="text-sm"> | ||
<div> | ||
<p className="inline-flex text-base">Your votes have been flagged</p> | ||
<ul className="flex flex-col gap-1 mt-2"> | ||
<li className="flex gap-1"> | ||
<Icon | ||
glyph="thumbsdown" | ||
size={20} | ||
className="inline flex-shrink-0" | ||
/>{' '} | ||
Be more thoughtful with your voting. | ||
</li> | ||
<li className="flex gap-1"> | ||
<Icon glyph="meh" size={20} className="inline flex-shrink-0" />{' '} | ||
Write better descriptions for your choices. | ||
</li> | ||
<li className="flex gap-1"> | ||
<img | ||
sizes="20px" | ||
src="doubloon.svg" | ||
alt="doubloons" | ||
className="w-4 sm:w-5 h-4 sm:h-5" | ||
/>{' '} | ||
Until you lift the curse, your payouts are halved. | ||
</li> | ||
</ul> | ||
</div> | ||
</PopoverContent> | ||
</Popover> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters