2021-04-26 16:36:41 +00:00
|
|
|
import React, { useContext } from "react"
|
2021-05-11 14:37:15 +00:00
|
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
2021-04-26 16:36:41 +00:00
|
|
|
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 }) {
|
2021-05-11 14:37:15 +00:00
|
|
|
const { server } = useContext(ContextServer)
|
2021-04-26 16:36:41 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<b {...props}>
|
|
|
|
<FontAwesomeIcon icon={faGlobe}/> {server}
|
|
|
|
</b>
|
|
|
|
)
|
|
|
|
}
|