File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,23 @@ import Link from 'next/link';
2
2
import Button from './Button' ;
3
3
4
4
function LanguageButton ( { language } : { language : string } ) {
5
- if ( language == "HTML" ) {
6
- language = "HTML5"
5
+ let url ;
6
+ if ( language == 'HTML' ) {
7
+ language = 'HTML5' ;
8
+ url = `https://cdn.simpleicons.org/${ language . toLowerCase ( ) } /default` ;
9
+ } else if ( language == 'Java' ) {
10
+ url = 'https://img.icons8.com/color/48/java-coffee-cup-logo--v1.png' ;
11
+ } else if ( language == 'Rust' ) {
12
+ url = `https://cdn.simpleicons.org/${ language . toLowerCase ( ) } /red` ;
13
+ } else {
14
+ url = `https://cdn.simpleicons.org/${ language . toLowerCase ( ) } /default` ;
7
15
}
8
- const url = `https://cdn.simpleicons.org/${ language . toLowerCase ( ) } /default` ;
9
16
return (
10
17
< Link href = { `/repos/${ language . toLowerCase ( ) } ` } >
11
- < Button > < img className = 'mr-1 h-5 w-5' src = { url } alt = { language } /> { language } </ Button >
18
+ < Button >
19
+ { ' ' }
20
+ < img className = "mr-1 h-5 w-5" src = { url } alt = { language } /> { language }
21
+ </ Button >
12
22
</ Link >
13
23
) ;
14
24
}
You can’t perform that action at this time.
0 commit comments