Skip to content

Commit 4dfaeab

Browse files
aidenybaiamiagent
andcommitted
simplify website branding to inline face, drop box art
Generated with [Ami](https://ami.dev) Co-Authored-By: Ami <noreply@ami.dev>
1 parent 6173790 commit 4dfaeab

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

packages/website/src/components/terminal.tsx

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -125,29 +125,19 @@ const FadeIn = ({ children }: { children: React.ReactNode }) => (
125125
<div className="animate-fade-in">{children}</div>
126126
);
127127

128-
const getDoctorFace = (score: number): [string, string] => {
129-
if (score >= SCORE_GOOD_THRESHOLD) return ["◠ ◠", " ▽ "];
130-
if (score >= SCORE_OK_THRESHOLD) return ["• •", " ─ "];
131-
return ["x x", " ▽ "];
128+
const getDoctorFace = (score: number): string => {
129+
if (score >= SCORE_GOOD_THRESHOLD) return "◠‿◠";
130+
if (score >= SCORE_OK_THRESHOLD) return "•_•";
131+
return "x_x";
132132
};
133133

134-
const DoctorBranding = ({ score }: { score: number }) => {
135-
const [eyes, mouth] = getDoctorFace(score);
136-
const colorClass = getScoreColor(score);
137-
138-
return (
139-
<div>
140-
<div className={colorClass}>{" ┌─────┐"}</div>
141-
<div className={colorClass}>{` │ ${eyes} │`}</div>
142-
<div className={colorClass}>{` │ ${mouth} │`}</div>
143-
<div className={colorClass}>{" └─────┘"}</div>
144-
<div>
145-
{" React Doctor "}
146-
<span className="text-neutral-500">(www.react.doctor)</span>
147-
</div>
148-
</div>
149-
);
150-
};
134+
const DoctorBranding = ({ score }: { score: number }) => (
135+
<div>
136+
<span className={getScoreColor(score)}>{getDoctorFace(score)}</span>
137+
{" React Doctor "}
138+
<span className="text-neutral-500">(www.react.doctor)</span>
139+
</div>
140+
);
151141

152142
const ScoreBar = ({ score, barWidth }: { score: number; barWidth: number }) => {
153143
const filledCount = Math.round((score / PERFECT_SCORE) * barWidth);

0 commit comments

Comments
 (0)