mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-06-07 08:56:58 +00:00
Add useTranslation
This commit is contained in:
parent
a49e82277e
commit
8623500d88
@ -16,6 +16,7 @@ import { getFee } from '../background';
|
|||||||
import { fileToBase64 } from '../utils/fileReading';
|
import { fileToBase64 } from '../utils/fileReading';
|
||||||
import { LoadingButton } from '@mui/lab';
|
import { LoadingButton } from '@mui/lab';
|
||||||
import ErrorIcon from '@mui/icons-material/Error';
|
import ErrorIcon from '@mui/icons-material/Error';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
|
export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
|
||||||
const [hasAvatar, setHasAvatar] = useState(false);
|
const [hasAvatar, setHasAvatar] = useState(false);
|
||||||
@ -40,6 +41,8 @@ export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
|
|||||||
const open = Boolean(anchorEl);
|
const open = Boolean(anchorEl);
|
||||||
const id = open ? 'avatar-img' : undefined;
|
const id = open ? 'avatar-img' : undefined;
|
||||||
|
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
|
|
||||||
const checkIfAvatarExists = async () => {
|
const checkIfAvatarExists = async () => {
|
||||||
try {
|
try {
|
||||||
const identifier = `qortal_avatar`;
|
const identifier = `qortal_avatar`;
|
||||||
|
@ -11,9 +11,11 @@ import BoundedNumericTextField from '../common/BoundedNumericTextField';
|
|||||||
import { PasswordField } from './PasswordField/PasswordField';
|
import { PasswordField } from './PasswordField/PasswordField';
|
||||||
import { ErrorText } from './ErrorText/ErrorText';
|
import { ErrorText } from './ErrorText/ErrorText';
|
||||||
import { getFee } from '../background';
|
import { getFee } from '../background';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export const QortPayment = ({ balance, show, onSuccess, defaultPaymentTo }) => {
|
export const QortPayment = ({ balance, show, onSuccess, defaultPaymentTo }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation(['auth', 'core', 'group']);
|
||||||
const [paymentTo, setPaymentTo] = useState<string>(defaultPaymentTo);
|
const [paymentTo, setPaymentTo] = useState<string>(defaultPaymentTo);
|
||||||
const [paymentAmount, setPaymentAmount] = useState<number>(0);
|
const [paymentAmount, setPaymentAmount] = useState<number>(0);
|
||||||
const [paymentPassword, setPaymentPassword] = useState<string>('');
|
const [paymentPassword, setPaymentPassword] = useState<string>('');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user