File tree Expand file tree Collapse file tree 1 file changed +11
-21
lines changed
packages/website/src/components Expand file tree Collapse file tree 1 file changed +11
-21
lines changed Original file line number Diff line number Diff 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
152142const ScoreBar = ( { score, barWidth } : { score : number ; barWidth : number } ) => {
153143 const filledCount = Math . round ( ( score / PERFECT_SCORE ) * barWidth ) ;
You can’t perform that action at this time.
0 commit comments