From b2f24e55abfec0aedf18212c8a0c9f693fbf78ae Mon Sep 17 00:00:00 2001 From: verbiricha Date: Fri, 22 Dec 2023 19:07:29 +0100 Subject: [PATCH] fix: max width, badge settings, tweak rarity --- apps/badges/core/rarity.ts | 8 ++++---- apps/badges/ui/badge-award.tsx | 2 +- apps/badges/ui/const.ts | 1 + apps/badges/ui/header.tsx | 3 ++- apps/badges/ui/main.tsx | 5 +++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/badges/core/rarity.ts b/apps/badges/core/rarity.ts index 840992d..454dfce 100644 --- a/apps/badges/core/rarity.ts +++ b/apps/badges/core/rarity.ts @@ -20,10 +20,10 @@ export function getPow(id: string) { return nip13.getPow(id); } -const LEGENDARY = 128; -const EPIC = 64; -const SUPER_RARE = 32; -const RARE = 21; +const LEGENDARY = 64; +const EPIC = 32; +const SUPER_RARE = 21; +const RARE = 12; export function getMinPow(r: Rarities): number { if (r === Rarities.Legendary) { diff --git a/apps/badges/ui/badge-award.tsx b/apps/badges/ui/badge-award.tsx index d56d598..55f4d55 100644 --- a/apps/badges/ui/badge-award.tsx +++ b/apps/badges/ui/badge-award.tsx @@ -42,7 +42,7 @@ export default function BadgeAward({ award, profile }: BadgeAwardProps) { {badge && } - {badge && profile && session?.pubkey && ( + {badge && profile && isForMe && ( diff --git a/apps/badges/ui/main.tsx b/apps/badges/ui/main.tsx index fe68817..8bc17d5 100644 --- a/apps/badges/ui/main.tsx +++ b/apps/badges/ui/main.tsx @@ -1,12 +1,13 @@ import { Stack, StackProps } from "@chakra-ui/react"; +import { maxWidth } from "./const"; + export default function Main(props: StackProps) { return (