aboutsummaryrefslogtreecommitdiff
path: root/components/anime/mobile/reused
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-12-24 13:03:54 +0700
committerFactiven <[email protected]>2023-12-24 13:03:54 +0700
commit50a0f0240d7fef133eb5acc1bea2b1168b08e9db (patch)
tree307e09e505580415a58d64b5fc3580e9235869f1 /components/anime/mobile/reused
parentUpdate README.md (#104) (diff)
downloadmoopa-50a0f0240d7fef133eb5acc1bea2b1168b08e9db.tar.xz
moopa-50a0f0240d7fef133eb5acc1bea2b1168b08e9db.zip
migrate to typescript
Diffstat (limited to 'components/anime/mobile/reused')
-rw-r--r--components/anime/mobile/reused/infoChip.tsx (renamed from components/anime/mobile/reused/infoChip.js)23
1 files changed, 19 insertions, 4 deletions
diff --git a/components/anime/mobile/reused/infoChip.js b/components/anime/mobile/reused/infoChip.tsx
index 41def85..80ebf83 100644
--- a/components/anime/mobile/reused/infoChip.js
+++ b/components/anime/mobile/reused/infoChip.tsx
@@ -1,7 +1,20 @@
-import React from "react";
-import { getFormat } from "../../../../utils/getFormat";
+import React, { CSSProperties, FC } from "react";
+import { getFormat } from "@/utils/getFormat";
-export default function InfoChip({ info, color, className }) {
+interface Info {
+ episodes?: number;
+ averageScore?: number;
+ format?: string;
+ status?: string;
+}
+
+interface InfoChipProps {
+ info: Info;
+ color: any;
+ className: string;
+}
+
+const InfoChip: FC<InfoChipProps> = ({ info, color, className }) => {
return (
<div
className={`flex-wrap w-full justify-start md:pt-1 gap-4 ${className}`}
@@ -40,4 +53,6 @@ export default function InfoChip({ info, color, className }) {
)}
</div>
);
-}
+};
+
+export default InfoChip;