chore: setup cspell and fix some typoes (#352)

Co-authored-by: DIYgod <i@diygod.me>
This commit is contained in:
UncleBill
2023-04-16 20:42:00 +01:00
committed by GitHub
co-authored by DIYgod
parent ee08666375
commit d7ca395215
26 changed files with 968 additions and 517 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
import type { AchievementSection } from "~/models/site.model"
import { Image } from "~/components/ui/Image"
import { AchievementModal } from "~/components/common/AchievementModal"
import { useEffect, useState } from "react"
import { useState } from "react"
import { Indicator } from "@mantine/core"
import { useDate } from "~/hooks/useDate"
import { useTranslation } from "next-i18next"
@@ -50,14 +50,14 @@ export const AchievementItem: React.FC<{
? group.items.filter((item) => item.status === "MINTABLE").pop()
: null
const achievementComming = isOwner
? group.items.filter((item) => item.status === "COMMING").pop()
const achievementComing = isOwner
? group.items.filter((item) => item.status === "COMING").pop()
: null
const [opened, setOpened] = useState(false)
if (isOwner) {
if (!achievement && !achievementMintable && !achievementComming) {
if (!achievement && !achievementMintable && !achievementComing) {
return null
}
} else {
@@ -78,7 +78,7 @@ export const AchievementItem: React.FC<{
>
<Badge
media={
(achievement || achievementMintable || achievementComming)!.info
(achievement || achievementMintable || achievementComing)!.info
.media
}
className={`mb-1 ${!achievement && "grayscale"}`}
@@ -122,7 +122,7 @@ export const AchievementItem: React.FC<{
)
.humanize(),
})
: t(achievementMintable ? "Mintable" : "Comming soon")}
: t(achievementMintable ? "Mintable" : "Coming soon")}
</span>
</div>
</div>
+7 -9
View File
@@ -5,7 +5,6 @@ import Tilt from "react-parallax-tilt"
import { Badge } from "~/components/common/AchievementItem"
import { Button } from "~/components/ui/Button"
import { useMintAchievement } from "~/queries/site"
import { useRouter } from "next/router"
import { BlockchainIcon } from "~/components/icons/BlockchainIcon"
import { useDate } from "~/hooks/useDate"
import { useTranslation } from "next-i18next"
@@ -30,15 +29,15 @@ export const AchievementModal: React.FC<{
? group.items.filter((item) => item.status === "MINTABLE").pop()
: null
const achievementComming = isOwner
? group.items.filter((item) => item.status === "COMMING").pop()
const achievementComing = isOwner
? group.items.filter((item) => item.status === "COMING").pop()
: null
const mintAchievement = useMintAchievement()
const mint = async (tokenId: number) => {
if (characterId) {
await mintAchievement.mutate({
mintAchievement.mutate({
characterId,
achievementId: tokenId,
})
@@ -73,8 +72,7 @@ export const AchievementModal: React.FC<{
<div
className="inline-flex flex-col text-center items-center text-white"
key={
(achievement || achievementMintable || achievementComming)!.info
.name
(achievement || achievementMintable || achievementComing)!.info.name
}
>
<Tilt
@@ -93,7 +91,7 @@ export const AchievementModal: React.FC<{
fill
alt="achievement"
src={
(achievement || achievementMintable || achievementComming)!.info
(achievement || achievementMintable || achievementComing)!.info
.media
}
className="relative w-full h-full"
@@ -108,7 +106,7 @@ export const AchievementModal: React.FC<{
</span>
<span className="text-lg text-black capitalize truncate">
{
(achievement || achievementMintable || achievementComming)!.info
(achievement || achievementMintable || achievementComing)!.info
.description
}
</span>
@@ -138,7 +136,7 @@ export const AchievementModal: React.FC<{
</span>
</>
) : (
t(achievementMintable ? "Mintable" : "Comming soon")
t(achievementMintable ? "Mintable" : "Coming soon")
)}
</span>
</div>
+3 -2
View File
@@ -119,6 +119,7 @@ export const Reactions: React.FC<{
window.innerHeight,
},
shapes: ["star"],
// cspell:disable-next-line
colors: ["FFE400", "FFBD00", "E89400", "FFCA6C", "FDFFB8"],
})
}
@@ -329,7 +330,7 @@ export const Reactions: React.FC<{
<Modal
open={isLikeOpen}
setOpen={setIsLikeOpen}
title={t("Like successfull") || ""}
title={t("Like successfully") || ""}
>
<div className="p-5">
<Trans i18nKey="like stored">
@@ -351,7 +352,7 @@ export const Reactions: React.FC<{
<Modal
open={isMintOpen}
setOpen={setIsMintOpen}
title={t("Mint successfull") || ""}
title={t("Mint successfully") || ""}
>
<div className="p-5">
<Trans i18nKey="mint stored">
+1 -1
View File
@@ -1,6 +1,6 @@
import { cn } from "~/lib/utils"
import { useRouter } from "next/router"
import React, { useEffect, useState } from "react"
import React, { useEffect } from "react"
import { DISCORD_LINK, APP_NAME } from "~/lib/env"
import { getSiteLink } from "~/lib/helpers"
+1 -1
View File
@@ -1,4 +1,4 @@
import { APP_NAME, SITE_URL } from "~/lib/env"
import { SITE_URL } from "~/lib/env"
import { UniLink } from "../ui/UniLink"
import { Profile, Note } from "~/lib/types"
import Script from "next/script"
+2 -2
View File
@@ -66,7 +66,7 @@ export const Editor: React.FC<{
for (let i = 0; i < items.length; i++) {
const file = items[i]?.getAsFile()
if (file) {
await handleDropFile?.(file)
handleDropFile?.(file)
}
}
})()
@@ -79,7 +79,7 @@ export const Editor: React.FC<{
{
;(async () => {
for (let i = 0; i < items.length; i++) {
await handleDropFile?.(items[i])
handleDropFile?.(items[i])
}
})()
}
+3 -3
View File
@@ -13,7 +13,7 @@ type InputProps<TMultiline extends boolean> = {
} & React.ComponentPropsWithRef<TMultiline extends true ? "textarea" : "input">
export const Input = forwardRef(function Input<
TMutliline extends boolean = false,
TMultiline extends boolean = false,
>(
{
label,
@@ -25,8 +25,8 @@ export const Input = forwardRef(function Input<
help,
multiline,
...inputProps
}: InputProps<TMutliline>,
ref: TMutliline extends true
}: InputProps<TMultiline>,
ref: TMultiline extends true
? React.ForwardedRef<HTMLTextAreaElement>
: React.ForwardedRef<HTMLInputElement>,
) {