[+] Added visual support (server card icon) for modded servers

This commit is contained in:
Charles Le Maux 2024-09-15 20:47:58 +02:00
parent 99b89c3983
commit e774eae544
3 changed files with 10 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -1,12 +1,15 @@
import { Link } from 'react-router-dom';
import styles from './serverCard.module.scss';
import bukkit from '../../assets/frameworks/bukkit.png';
import fabric from '../../assets/frameworks/fabric.png';
import forge from '../../assets/frameworks/forge.png';
import paper from '../../assets/frameworks/paper.png';
import spigot from '../../assets/frameworks/spigot.png';
import bukkit from '../../assets/frameworks/bukkit.png';
import vanilla from '../../assets/frameworks/vanilla.png';
import PropTypes from "prop-types";
// eslint-disable-next-line react/prop-types
const ServerCard = ({ status, version, name, framework, onRunClick, onStopClick, onDeleteClick , countPlayers , maxPlayers}) => {
@ -14,10 +17,14 @@ const ServerCard = ({ status, version, name, framework, onRunClick, onStopClick,
switch (framework) {
case "bukkit":
return bukkit;
case "spigot":
return spigot;
case "fabric":
return fabric;
case "forge":
return forge;
case "paper":
return paper;
case "spigot":
return spigot;
default:
return vanilla;
}