X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=inline;f=resources%2Fjs%2Fcomponents%2Fcommon%2FDiscordSelect.js;h=65c94d63cab503893137052ec61d1ccf20456f0c;hb=e49b130505f5712075dca2ff990e5a63fc90ce3c;hp=a279cdef83a332668ad6bed14c512cd3deb9c025;hpb=b940ecdcd62df84881f4d4555801672155c9dcce;p=alttp.git diff --git a/resources/js/components/common/DiscordSelect.js b/resources/js/components/common/DiscordSelect.js index a279cde..65c94d6 100644 --- a/resources/js/components/common/DiscordSelect.js +++ b/resources/js/components/common/DiscordSelect.js @@ -1,8 +1,10 @@ import axios from 'axios'; import PropTypes from 'prop-types'; import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { Form, ListGroup } from 'react-bootstrap'; +import { Alert, Button, Form, ListGroup } from 'react-bootstrap'; +import { useTranslation } from 'react-i18next'; +import Icon from './Icon'; import GuildBox from '../discord-guilds/Box'; import debounce from '../../helpers/debounce'; @@ -13,6 +15,7 @@ const DiscordSelect = ({ onChange, value }) => { const [showResults, setShowResults] = useState(false); const ref = useRef(null); + const { t } = useTranslation(); useEffect(() => { const handleEventOutside = e => { @@ -66,7 +69,17 @@ const DiscordSelect = ({ onChange, value }) => { }, [value]); if (value) { - return