1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-26 15:04:18 +00:00
pds-2021-g2-nest/code/frontend/src/components/interactive/CurrentServer.js

23 lines
611 B
JavaScript
Raw Normal View History

2021-04-26 16:36:41 +00:00
import React, { useContext } from "react"
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
import { faGlobe } from "@fortawesome/free-solid-svg-icons"
2021-04-29 14:58:31 +00:00
import ContextServer from "../../contexts/ContextServer"
2021-04-26 16:36:41 +00:00
/**
* An element displaying inline the current backend server.
*
* @param props - Additional props to pass to the element.
* @returns {JSX.Element}
* @constructor
*/
export default function CurrentServer({ ...props }) {
const {server} = useContext(ContextServer);
return (
<b {...props}>
<FontAwesomeIcon icon={faGlobe}/> {server}
</b>
)
}