From 1eb9088b8d0fb040baae8726421c7c01cb79720d Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Wed, 11 Jun 2025 21:34:08 +0200 Subject: [PATCH] Remove "basic tabs example" --- src/components/Apps/AppsDevModeNavBar.tsx | 3 - src/components/Apps/AppsNavBarDesktop.tsx | 1 - src/components/Apps/AppsPrivate.tsx | 8 +-- src/components/Group/AddGroup.tsx | 3 - src/components/Group/ManageMembers.tsx | 3 - src/components/Minting/Minting.tsx | 88 ++++------------------- src/components/Tutorials/Tutorials.tsx | 3 - src/i18n/locales/de/core.json | 1 - src/i18n/locales/en/core.json | 1 - src/i18n/locales/es/core.json | 1 - src/i18n/locales/fr/core.json | 1 - src/i18n/locales/it/core.json | 1 - src/i18n/locales/ja/core.json | 3 +- src/i18n/locales/ru/core.json | 1 - src/i18n/locales/zh/core.json | 1 - 15 files changed, 19 insertions(+), 100 deletions(-) diff --git a/src/components/Apps/AppsDevModeNavBar.tsx b/src/components/Apps/AppsDevModeNavBar.tsx index 548f1d2..add58e9 100644 --- a/src/components/Apps/AppsDevModeNavBar.tsx +++ b/src/components/Apps/AppsDevModeNavBar.tsx @@ -108,9 +108,6 @@ export const AppsDevModeNavBar = () => { { { } }; - const handleChange = (event: React.SyntheticEvent, newValue: number) => { + const handleChange = (event: SyntheticEvent, newValue: number) => { setValueTabPrivateApp(newValue); }; @@ -353,9 +354,6 @@ export const AppsPrivate = ({ myName, myAddress }) => { { { const [nodeInfos, setNodeInfos] = useState({}); const [openSnack, setOpenSnack] = useState(false); const [isLoading, setIsLoading] = useState(false); + const [adminInfo, setAdminInfo] = useState({}); const { isShow: isShowNext, onOk, show: showNext } = useModal(); const theme = useTheme(); const { t } = useTranslation([ @@ -86,9 +87,8 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { const getName = async (address) => { try { - const response = await fetch( - `${getBaseApiReact()}/names/primary/${address}` - ); + const url = `${getBaseApiReact()}/names/primary/${address}`; + const response = await fetch(url); const nameData = await response.json(); if (nameData?.name) { setNames((prev) => { @@ -161,20 +161,6 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { return address; }; - // const handleAccountInfos = (address, field) => { - // if (!address) return undefined; - // if (accountInfos[address]) return accountInfos[address]?.[field]; - // if (accountInfos[address] === null) return undefined; - // getAccountInfo(address, true); - // return undefined; - // }; - - const calculateBlocksRemainingToLevel1 = (address) => { - if (!address) return undefined; - if (!accountInfos[address]) return undefined; - return 7200 - accountInfos[address]?.blocksMinted || 0; - }; - const getNodeInfos = async () => { try { const url = `${getBaseApiReact()}/admin/status`; @@ -206,6 +192,17 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { } }, []); + const getAdminInfo = async () => { + try { + const url = `${getBaseApiReact()}/admin/info`; + const response = await fetch(url); + const data = await response.json(); + setAdminInfo(data); + } catch (error) { + console.log(error); + } + }; + const addMintingAccount = useCallback(async (val) => { try { setIsLoading(true); @@ -449,62 +446,6 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { } }; - // const getPublicKeyFromAddress = async (address) => { - // const url = `${getBaseApiReact()}/addresses/publickey/${address}`; - // const response = await fetch(url); - // const data = await response.text(); - // return data; - // }; - - // const checkIfMinterGroup = async (address) => { - // const url = `${getBaseApiReact()}/groups/member/${address}`; - // const response = await fetch(url); - // const data = await response.json(); - // return !!data?.find((grp) => grp?.groupId?.toString() === '694'); - // }; - - // const removeRewardShare = useCallback(async (rewardShare) => { - // return await new Promise((res, rej) => { - // window - // .sendMessage('removeRewardShare', { - // rewardShareKeyPairPublicKey: rewardShare.rewardSharePublicKey, - // recipient: rewardShare.recipient, - // percentageShare: -1, - // }) - // .then((response) => { - // if (!response?.error) { - // res(response); - // setTxList((prev) => [ - // { - // ...rewardShare, - // ...response, - // type: 'remove-rewardShare', - // label: t('group:message.success.rewardshare_remove', { - // postProcess: 'capitalizeFirstChar', - // }), - // labelDone: t('group:message.success.rewardshare_remove_label', { - // postProcess: 'capitalizeFirstChar', - // }), - // done: false, - // }, - // ...prev, - // ]); - // return; - // } - // rej({ message: response.error }); - // }) - // .catch((error) => { - // rej({ - // message: - // error.message || - // t('core:message.error.generic', { - // postProcess: 'capitalizeFirstChar', - // }), - // }); - // }); - // }); - // }, []); - useEffect(() => { getNodeInfos(); getMintingAccounts(); @@ -924,6 +865,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { + {/* */} diff --git a/src/components/Tutorials/Tutorials.tsx b/src/components/Tutorials/Tutorials.tsx index 4075b67..416ea3d 100644 --- a/src/components/Tutorials/Tutorials.tsx +++ b/src/components/Tutorials/Tutorials.tsx @@ -47,9 +47,6 @@ export const Tutorials = () => { }} value={multiNumber} onChange={(e, value) => setMultiNumber(value)} - aria-label={t('core:basic_tabs_example', { - postProcess: 'capitalizeFirstChar', - })} > {openTutorialModal?.multi?.map((item, index) => { return ( diff --git a/src/i18n/locales/de/core.json b/src/i18n/locales/de/core.json index 3014761..ad2c602 100644 --- a/src/i18n/locales/de/core.json +++ b/src/i18n/locales/de/core.json @@ -116,7 +116,6 @@ "apps_official": "offizielle Apps", "attachment": "Anhang", "balance": "Gleichgewicht:", - "basic_tabs_example": "Basic Tabs Beispiel", "category": "Kategorie", "category_other": "Kategorien", "chat": "Chat", diff --git a/src/i18n/locales/en/core.json b/src/i18n/locales/en/core.json index 6e9365b..1d39e57 100644 --- a/src/i18n/locales/en/core.json +++ b/src/i18n/locales/en/core.json @@ -116,7 +116,6 @@ "apps_official": "official Apps", "attachment": "attachment", "balance": "balance:", - "basic_tabs_example": "basic tabs example", "category": "category", "category_other": "categories", "chat": "chat", diff --git a/src/i18n/locales/es/core.json b/src/i18n/locales/es/core.json index 0de3cf3..f4cae5a 100644 --- a/src/i18n/locales/es/core.json +++ b/src/i18n/locales/es/core.json @@ -116,7 +116,6 @@ "apps_official": "aplicaciones oficiales", "attachment": "adjunto", "balance": "balance:", - "basic_tabs_example": "Ejemplo de pestañas básicas", "category": "categoría", "category_other": "categorías", "chat": "charlar", diff --git a/src/i18n/locales/fr/core.json b/src/i18n/locales/fr/core.json index 8c6439c..7f6fd37 100644 --- a/src/i18n/locales/fr/core.json +++ b/src/i18n/locales/fr/core.json @@ -116,7 +116,6 @@ "apps_official": "Applications officielles", "attachment": "pièce jointe", "balance": "équilibre:", - "basic_tabs_example": "Exemple de base des onglets", "category": "catégorie", "category_other": "catégories", "chat": "chat", diff --git a/src/i18n/locales/it/core.json b/src/i18n/locales/it/core.json index d513b0b..8d47b2c 100644 --- a/src/i18n/locales/it/core.json +++ b/src/i18n/locales/it/core.json @@ -116,7 +116,6 @@ "apps_official": "app ufficiali", "attachment": "allegato", "balance": "bilancio:", - "basic_tabs_example": "esempio di schede base", "category": "categoria", "category_other": "categorie", "chat": "chat", diff --git a/src/i18n/locales/ja/core.json b/src/i18n/locales/ja/core.json index 95cddea..00a9c62 100644 --- a/src/i18n/locales/ja/core.json +++ b/src/i18n/locales/ja/core.json @@ -116,7 +116,6 @@ "apps_official": "公式アプリ", "attachment": "添付ファイル", "balance": "バランス:", - "basic_tabs_example": "基本的なタブの例", "category": "カテゴリ", "category_other": "カテゴリ", "chat": "チャット", @@ -395,4 +394,4 @@ }, "website": "Webサイト", "welcome": "いらっしゃいませ" -} \ No newline at end of file +} diff --git a/src/i18n/locales/ru/core.json b/src/i18n/locales/ru/core.json index bc8ce00..36ea098 100644 --- a/src/i18n/locales/ru/core.json +++ b/src/i18n/locales/ru/core.json @@ -116,7 +116,6 @@ "apps_official": "официальные приложения", "attachment": "вложение", "balance": "баланс:", - "basic_tabs_example": "Основные вкладки", "category": "категория", "category_other": "категории", "chat": "чат", diff --git a/src/i18n/locales/zh/core.json b/src/i18n/locales/zh/core.json index c1b0a84..f241237 100644 --- a/src/i18n/locales/zh/core.json +++ b/src/i18n/locales/zh/core.json @@ -116,7 +116,6 @@ "apps_official": "官方应用程序", "attachment": "依恋", "balance": "平衡:", - "basic_tabs_example": "基本标签示例", "category": "类别", "category_other": "类别", "chat": "聊天",