mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 21:14:18 +00:00
23 lines
608 B
JavaScript
23 lines
608 B
JavaScript
|
import React, { useContext } from "react"
|
||
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
|
||
|
import { faGlobe } from "@fortawesome/free-solid-svg-icons"
|
||
|
import ContextServer from "../contexts/ContextServer"
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 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>
|
||
|
)
|
||
|
}
|