Newer
Older
taehui / qwilight-fe / src / components / JudgmentModeText.tsx
@Taehui Taehui on 26 Mar 534 bytes v1.0.0
import { useMemo } from "react";

export default function JudgmentModeText({
  judgmentMode,
  text,
}: {
  judgmentMode: number;
  text: string;
}) {
  return (
    <span
      className={useMemo(() => {
        switch (judgmentMode) {
          case 0:
            return "level2";
          case 2:
            return "level4";
          case 3:
            return "level1";
          case 5:
            return "level5";
          default:
            return "point";
        }
      }, [])}
    >
      {text}
    </span>
  );
}