diff --git a/package-lock.json b/package-lock.json index ad2b00e8..f5ad2010 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "@solana/wallet-adapter-react": "0.15.35", "@solana/wallet-adapter-react-ui": "0.9.34", "@solana/web3.js": "1.87.6", + "@tanstack/react-query": "^5.18.1", "axios": "1.6.7", "buffer": "6.0.3", "expo": "49.0.18", @@ -49,7 +50,6 @@ "expo-status-bar": "~1.6.0", "lodash": "4.17.21", "react": "18.2.0", - "react-async-hook": "4.0.0", "react-dom": "18.2.0", "react-error-overlay": "6.0.11", "react-native": "0.72.6", @@ -9008,6 +9008,30 @@ "node": ">=8" } }, + "node_modules/@tanstack/query-core": { + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.18.1.tgz", + "integrity": "sha512-fYhrG7bHgSNbnkIJF2R4VUXb4lF7EBiQjKkDc5wOlB7usdQOIN4LxxHpDxyE3qjqIst1WBGvDtL48T0sHJGKCw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.18.1.tgz", + "integrity": "sha512-PdI07BbsahZ+04PxSuDQsQvBWe008eWFk/YYWzt8fvzt2sALUM0TpAJa/DFpqa7+SSo7j1EQR6Jx6znXNHyaXw==", + "dependencies": { + "@tanstack/query-core": "5.18.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18.0.0" + } + }, "node_modules/@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", diff --git a/package.json b/package.json index 31cc1f73..de803b89 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@solana/wallet-adapter-react": "0.15.35", "@solana/wallet-adapter-react-ui": "0.9.34", "@solana/web3.js": "1.87.6", + "@tanstack/react-query": "^5.18.1", "axios": "1.6.7", "buffer": "6.0.3", "expo": "49.0.18", @@ -65,7 +66,6 @@ "expo-status-bar": "~1.6.0", "lodash": "4.17.21", "react": "18.2.0", - "react-async-hook": "4.0.0", "react-dom": "18.2.0", "react-error-overlay": "6.0.11", "react-native": "0.72.6", diff --git a/src/App.tsx b/src/App.tsx index 00104511..e9c9240d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -37,6 +37,8 @@ import { CreateSubdomainModal } from "./components/CreateSubdomainModal"; import { SuccessSubdomainModal } from "./components/SuccessSubdomainModal"; import { t } from "@lingui/macro"; import { i18n } from "@lingui/core"; +import { QueryClientProvider } from "@tanstack/react-query"; +import { queryClient } from "./lib"; import { LanguageProvider, useLanguageContext, @@ -201,19 +203,21 @@ function App() { https://github.com/gorhom/react-native-bottom-sheet/issues/1389 */} - - - - - - - - - - - - - + + + + + + + + + + + + + + + ); diff --git a/src/components/ProfileBlock.tsx b/src/components/ProfileBlock.tsx index 32b558d4..188a9bca 100644 --- a/src/components/ProfileBlock.tsx +++ b/src/components/ProfileBlock.tsx @@ -10,7 +10,6 @@ import tw from "@src/utils/tailwind"; import { abbreviate } from "@src/utils/abbreviate"; import { useWallet } from "@src/hooks/useWallet"; import { useFavoriteDomain } from "@src/hooks/useFavoriteDomain"; -import { useProfilePic } from "@bonfida/sns-react"; interface ProfileBlockProps { children?: ReactNode; @@ -66,7 +65,7 @@ export const ProfileBlock = ({ openModal("EditPicture", { currentPic: picRecord, domain: domain, - setAsFav: !favorite.result?.reverse, + setAsFav: !favorite.data?.reverse, refresh: onNewPicUploaded, }) } diff --git a/src/hooks/useDomainInfo.tsx b/src/hooks/useDomainInfo.tsx index d69b9543..b28e14a0 100644 --- a/src/hooks/useDomainInfo.tsx +++ b/src/hooks/useDomainInfo.tsx @@ -1,11 +1,13 @@ import { isTokenized } from "@bonfida/name-tokenizer"; -import { useSolanaConnection } from "../hooks/xnft-hooks"; +import { useQuery } from "@tanstack/react-query"; import { NameRegistryState, getDomainKeySync } from "@bonfida/spl-name-service"; -import { useAsync } from "react-async-hook"; +import { QueryKeys } from "@src/lib"; +import { useSolanaConnection } from "../hooks/xnft-hooks"; export const useDomainInfo = (domain: string) => { const connection = useSolanaConnection(); - const fn = async () => { + + const queryFn = async () => { if (!connection) return; const { pubkey } = getDomainKeySync(domain); const { registry, nftOwner } = await NameRegistryState.retrieve( @@ -20,5 +22,10 @@ export const useDomainInfo = (domain: string) => { isTokenized: _isTokenized, }; }; - return useAsync(fn, [!!connection, domain]); + + return useQuery({ + queryKey: [QueryKeys.domainInfo, domain], + queryFn, + staleTime: 1000 * 30, + }); }; diff --git a/src/hooks/useDomains.tsx b/src/hooks/useDomains.tsx index ab9ef5de..4f378019 100644 --- a/src/hooks/useDomains.tsx +++ b/src/hooks/useDomains.tsx @@ -1,5 +1,6 @@ -import { useAsync } from "react-async-hook"; +import { useQuery } from "@tanstack/react-query"; import axios from "axios"; +import { QueryKeys } from "@src/lib"; export interface Result { key: string; @@ -12,15 +13,20 @@ export interface Response { } const get = async (key: string | undefined | null) => { - if (!key) return; + if (!key) return []; const { data }: { data: Response } = await axios.get( `https://sns-sdk-proxy.bonfida.workers.dev/domains/${key}`, ); - if (data.s !== "ok") return; + if (data.s !== "ok") return []; data.result.sort((a, b) => a.domain.localeCompare(b.domain)); return data.result; }; export const useDomains = (owner: string | null | undefined) => { - return useAsync(get, [owner]); + return useQuery({ + queryKey: [QueryKeys.domainsList, owner], + queryFn: () => get(owner), + enabled: !!owner, + staleTime: 1000 * 30, + }); }; diff --git a/src/hooks/useFavoriteDomain.tsx b/src/hooks/useFavoriteDomain.tsx index 6e581eaf..5d1d19c7 100644 --- a/src/hooks/useFavoriteDomain.tsx +++ b/src/hooks/useFavoriteDomain.tsx @@ -1,19 +1,24 @@ import { getFavoriteDomain } from "@bonfida/spl-name-service"; import { PublicKey } from "@solana/web3.js"; import { useSolanaConnection } from "./xnft-hooks"; -import { useAsync } from "react-async-hook"; import { useWallet } from "./useWallet"; +import { QueryKeys } from "@src/lib"; +import { useQuery } from "@tanstack/react-query"; export const useFavoriteDomain = (owner: string | undefined) => { const connection = useSolanaConnection(); const { publicKey } = useWallet(); owner = owner || publicKey?.toBase58(); - const fn = async () => { + const queryFn = async () => { if (!connection || !owner) return; const fav = await getFavoriteDomain(connection, new PublicKey(owner)); return fav; }; - return useAsync(fn, [owner, !!connection]); + return useQuery({ + queryKey: [QueryKeys.favoriteDomain, owner], + queryFn, + staleTime: 1000 * 30, + }); }; diff --git a/src/hooks/usePyth.tsx b/src/hooks/usePyth.tsx index 5339e3e1..e8fb6349 100644 --- a/src/hooks/usePyth.tsx +++ b/src/hooks/usePyth.tsx @@ -3,7 +3,7 @@ import { PublicKey } from "@solana/web3.js"; import { Connection } from "@solana/web3.js"; import { tokenList } from "../utils/tokens/popular-tokens"; import { useSolanaConnection } from "./xnft-hooks"; -import { useAsync } from "react-async-hook"; +import { useQuery } from "@tanstack/react-query"; export interface Pyth { price: number; @@ -39,7 +39,8 @@ const getPrice = async (connection: Connection, feed: PublicKey) => { export const usePyth = () => { const connection = useSolanaConnection(); - const fn = async () => { + + const queryFn = async () => { if (!connection) return; const results = new Map(); for (let x of FEEDS.keys()) { @@ -52,5 +53,10 @@ export const usePyth = () => { return results; }; - return useAsync(fn, [!!connection]); + + return useQuery({ + queryKey: [], + queryFn, + staleTime: 1000 * 5, + }); }; diff --git a/src/hooks/useRecords.tsx b/src/hooks/useRecords.tsx index e39814f0..8e3722c6 100644 --- a/src/hooks/useRecords.tsx +++ b/src/hooks/useRecords.tsx @@ -3,7 +3,6 @@ import { ETH_ROA_RECORDS, GUARDIANS, Record, - RecordResult, SELF_SIGNED, } from "@bonfida/spl-name-service"; import { useRecordsV2 } from "@bonfida/sns-react"; @@ -76,7 +75,7 @@ export const useRecords = (domain: string | undefined, records: Record[]) => { const execute: ExecuteFunction = useCallback(async () => { try { - await domainInfo.execute(); + await domainInfo.refetch(); await res.execute(); } catch (error) { console.error(error); @@ -90,11 +89,11 @@ export const useRecords = (domain: string | undefined, records: Record[]) => { }); useEffect(() => { - if (!res || !res.result || !domainInfo || !domainInfo.result) { + if (!res || !res.result || !domainInfo || !domainInfo.data) { return setData({ execute, result: [], - loading: res.loading || domainInfo.loading, + loading: res.loading || domainInfo.isLoading, }); } @@ -108,7 +107,7 @@ export const useRecords = (domain: string | undefined, records: Record[]) => { const header = r?.retrievedRecord.header; const stalenessId = r?.retrievedRecord.getStalenessId(); const roaId = r?.retrievedRecord.getRoAId(); - const owner = new PublicKey(domainInfo.result.owner); + const owner = new PublicKey(domainInfo.data.owner); // Check staleness if ( @@ -144,16 +143,16 @@ export const useRecords = (domain: string | undefined, records: Record[]) => { setData({ result: _data, execute, - loading: domainInfo.loading || res.loading, + loading: domainInfo.isLoading || res.loading, }); }, [ res.loading, JSON.stringify(res.result?.map((e) => e?.deserializedContent)), - domainInfo.result?.owner, - domainInfo.result?.isTokenized, + domainInfo.data?.owner, + domainInfo.data?.isTokenized, domain, ...records, - domainInfo.loading, + domainInfo.isLoading, ]); return data; diff --git a/src/hooks/useRent.tsx b/src/hooks/useRent.tsx deleted file mode 100644 index 496846f2..00000000 --- a/src/hooks/useRent.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { useAsync } from "react-async-hook"; -import { useSolanaConnection } from "./xnft-hooks"; -import { LAMPORTS_PER_SOL } from "@solana/web3.js"; - -export const useRent = (size: number) => { - const connection = useSolanaConnection(); - const fn = async () => { - if (!connection) return 0; - const min = await connection.getMinimumBalanceForRentExemption(size); - return min / LAMPORTS_PER_SOL; - }; - - return useAsync(fn, [size, !!connection]); -}; diff --git a/src/hooks/useSubdomains.tsx b/src/hooks/useSubdomains.tsx index c7ca6487..ad0f2658 100644 --- a/src/hooks/useSubdomains.tsx +++ b/src/hooks/useSubdomains.tsx @@ -1,4 +1,3 @@ -import { useAsync } from "react-async-hook"; import { NAME_PROGRAM_ID, findSubdomains, @@ -11,6 +10,8 @@ import { } from "@bonfida/spl-name-service"; import { useSolanaConnection } from "./xnft-hooks"; import { AccountInfo, PublicKey } from "@solana/web3.js"; +import { useQuery } from "@tanstack/react-query"; +import { QueryKeys } from "@src/lib"; export interface SubdomainResult { key: string; @@ -20,7 +21,7 @@ export interface SubdomainResult { export const useSubdomains = (domain: string) => { const connection = useSolanaConnection(); - const fn = async () => { + const queryFn = async () => { if (!connection) return; const { pubkey: key } = getDomainKeySync(domain); @@ -30,7 +31,11 @@ export const useSubdomains = (domain: string) => { return subdomains; }; - return useAsync(fn, [!!connection, domain]); + return useQuery({ + queryKey: [QueryKeys.subdomainsFromUser, domain], + queryFn, + staleTime: 1000 * 30, + }); }; const deserializeReverseSub = ( @@ -44,7 +49,7 @@ const deserializeReverseSub = ( export const useSubdomainsFromUser = (owner: string) => { const connection = useSolanaConnection(); - const fn = async () => { + const queryFn = async () => { if (!connection) return; const accounts = await connection.getProgramAccounts(NAME_PROGRAM_ID, { filters: [{ memcmp: { offset: 32, bytes: owner } }], @@ -111,5 +116,9 @@ export const useSubdomainsFromUser = (owner: string) => { return result; }; - return useAsync(fn, [!!connection, owner]); + return useQuery({ + queryKey: [QueryKeys.subdomainsFromUser, owner], + queryFn, + staleTime: 1000 * 30, + }); }; diff --git a/src/hooks/useTopDomainsSales.tsx b/src/hooks/useTopDomainsSales.tsx index 5896b7f9..05e0d518 100644 --- a/src/hooks/useTopDomainsSales.tsx +++ b/src/hooks/useTopDomainsSales.tsx @@ -1,5 +1,5 @@ -import { useAsync } from "react-async-hook"; import axios from "axios"; +import { useQuery } from "@tanstack/react-query"; const URL = "https://sns-api.bonfida.com/sales/top"; @@ -13,7 +13,7 @@ interface SearchResponseEntity { } export const useTopDomainsSales = (allowedToLoad: boolean = true) => { - const fn = async () => { + const queryFn = async () => { if (!allowedToLoad) return; const startTime = new Date(); @@ -41,5 +41,10 @@ export const useTopDomainsSales = (allowedToLoad: boolean = true) => { })); }; - return useAsync(fn, []); + return useQuery({ + queryKey: [], + queryFn, + enabled: allowedToLoad, + staleTime: 1000 * 30, + }); }; diff --git a/src/hooks/useUserProgress.tsx b/src/hooks/useUserProgress.tsx index 0c44a640..c721533b 100644 --- a/src/hooks/useUserProgress.tsx +++ b/src/hooks/useUserProgress.tsx @@ -4,8 +4,9 @@ import { getRecord, } from "@bonfida/spl-name-service"; import { useSolanaConnection } from "./xnft-hooks"; -import { useAsync } from "react-async-hook"; import { useWallet } from "./useWallet"; +import { useQuery } from "@tanstack/react-query"; +import { QueryKeys } from "@src/lib"; export enum ProgressStep { Favorite = 0, @@ -33,7 +34,7 @@ export const useUserProgress = () => { const { publicKey } = useWallet(); const connection = useSolanaConnection(); - const fn = async () => { + const queryFn = async () => { const res: Progress[] = []; if (!publicKey || !connection) return; @@ -63,5 +64,9 @@ export const useUserProgress = () => { return res; }; - return useAsync(fn, [publicKey, !!connection]); + return useQuery({ + queryKey: [QueryKeys.userProgressBar, publicKey], + queryFn, + staleTime: 1000 * 30, + }); }; diff --git a/src/lib/index.ts b/src/lib/index.ts new file mode 100644 index 00000000..47647a71 --- /dev/null +++ b/src/lib/index.ts @@ -0,0 +1 @@ +export * from "./tanstack-query"; diff --git a/src/lib/tanstack-query.ts b/src/lib/tanstack-query.ts new file mode 100644 index 00000000..644263ac --- /dev/null +++ b/src/lib/tanstack-query.ts @@ -0,0 +1,12 @@ +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; + +export const queryClient = new QueryClient(); + +export enum QueryKeys { + domainsList = "domains-list", + domainInfo = "domain-info", + favoriteDomain = "favorite-domain", + subdomains = "subdomains", + subdomainsFromUser = "subdomains-from-user", + userProgressBar = "user-progress-bar", +} diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po index 98a17b10..1f7e0214 100644 --- a/src/locales/en/messages.po +++ b/src/locales/en/messages.po @@ -128,8 +128,8 @@ msgstr "" msgid "Cancel" msgstr "" -#: src/App.tsx:150 -#: src/App.tsx:166 +#: src/App.tsx:152 +#: src/App.tsx:168 msgid "Cart" msgstr "" @@ -145,11 +145,11 @@ msgstr "" #~ msgid "Choose a picture" #~ msgstr "" -#: src/screens/Cart/index.tsx:227 +#: src/screens/Cart/index.tsx:239 msgid "Clear all" msgstr "" -#: src/screens/Profile/index.tsx:286 +#: src/screens/Profile/index.tsx:290 msgid "Clear search" msgstr "" @@ -177,15 +177,15 @@ msgstr "" msgid "Confirm" msgstr "" -#: src/screens/Cart/index.tsx:381 +#: src/screens/Cart/index.tsx:393 msgid "Confirm and pay" msgstr "" -#: src/screens/Cart/index.tsx:447 +#: src/screens/Cart/index.tsx:459 msgid "Confirmation" msgstr "" -#: src/screens/Cart/index.tsx:409 +#: src/screens/Cart/index.tsx:421 msgid "Congrats on purchasing new domains!" msgstr "" @@ -197,12 +197,12 @@ msgstr "" #~ msgid "Connect your backpack username to your on-chain identity." #~ msgstr "" -#: src/screens/Cart/index.tsx:315 +#: src/screens/Cart/index.tsx:327 msgid "Continue" msgstr "" -#: src/components/ProfileBlock.tsx:84 -#: src/components/ProfileBlock.tsx:96 +#: src/components/ProfileBlock.tsx:83 +#: src/components/ProfileBlock.tsx:95 #: src/screens/DomainView.tsx:617 msgid "Copied!" msgstr "" @@ -245,7 +245,7 @@ msgstr "" msgid "Discount" msgstr "" -#: src/screens/Cart/index.tsx:312 +#: src/screens/Cart/index.tsx:324 msgid "Discounts may be applied in the next step" msgstr "" @@ -257,8 +257,8 @@ msgstr "" msgid "Domain name tokenization (wrapping), involves converting a domain name into an NFT. To reveal the original domain name, the token can be redeemed (unwrapped)." msgstr "" -#: src/App.tsx:140 -#: src/screens/Profile/index.tsx:228 +#: src/App.tsx:142 +#: src/screens/Profile/index.tsx:232 msgid "Domains" msgstr "" @@ -266,7 +266,7 @@ msgstr "" msgid "Each additional kb of memory costs around 0.007 SOL (0.001 USDC)" msgstr "" -#: src/screens/Cart/index.tsx:267 +#: src/screens/Cart/index.tsx:279 #: src/screens/DomainView.tsx:571 #: src/screens/DomainView.tsx:691 msgid "Edit" @@ -358,7 +358,7 @@ msgid "" " start building your profile" msgstr "" -#: src/screens/Cart/index.tsx:422 +#: src/screens/Cart/index.tsx:434 msgid "Get started with my profiles" msgstr "" @@ -428,18 +428,18 @@ msgstr "" msgid "Learn more in our docs" msgstr "" -#: src/screens/Profile/index.tsx:228 +#: src/screens/Profile/index.tsx:232 msgid "My domains" msgstr "" #: src/screens/Profile/index.tsx:298 -msgid "My sub domains" -msgstr "" - -#: src/screens/Profile.tsx:248 -#~ msgid "My subdomains" +#~ msgid "My sub domains" #~ msgstr "" +#: src/screens/Profile/index.tsx:302 +msgid "My subdomains" +msgstr "" + #: src/components/TransferModal.tsx:80 msgid "New {domain}.sol owner" msgstr "" @@ -457,7 +457,7 @@ msgid "No changes to save" msgstr "" #: src/components/SearchModal.tsx:74 -#: src/screens/Profile/index.tsx:276 +#: src/screens/Profile/index.tsx:280 msgid "No domain found" msgstr "" @@ -485,11 +485,11 @@ msgstr "" msgid "Ownership is verified" msgstr "" -#: src/screens/Cart/index.tsx:325 +#: src/screens/Cart/index.tsx:337 msgid "Pay with" msgstr "" -#: src/screens/Cart/index.tsx:446 +#: src/screens/Cart/index.tsx:458 msgid "Payment" msgstr "" @@ -517,7 +517,7 @@ msgstr "" msgid "Privacy Policy" msgstr "" -#: src/App.tsx:129 +#: src/App.tsx:131 msgid "Profile" msgstr "" @@ -525,7 +525,7 @@ msgstr "" #~ msgid "Profile completed: {percentage}%" #~ msgstr "" -#: src/screens/Profile/index.tsx:201 +#: src/screens/Profile/index.tsx:205 msgid "Profile completion: {percentage}%" msgstr "" @@ -584,7 +584,7 @@ msgid "Search domains" msgstr "" #: src/screens/HomeScreen.tsx:95 -#: src/screens/Profile/index.tsx:235 +#: src/screens/Profile/index.tsx:239 #: src/screens/SearchResult.tsx:77 msgid "Search for a domain" msgstr "" @@ -649,11 +649,11 @@ msgstr "" msgid "Storage Size" msgstr "" -#: src/screens/Cart/index.tsx:251 +#: src/screens/Cart/index.tsx:263 msgid "Storage:" msgstr "" -#: src/screens/Profile/index.tsx:298 +#: src/screens/Profile/index.tsx:302 msgid "Sub domains" msgstr "" @@ -809,7 +809,7 @@ msgstr "" msgid "Wrap your domain into an NFT" msgstr "" -#: src/screens/Cart/index.tsx:414 +#: src/screens/Cart/index.tsx:426 msgid "You can enjoy the full benefits of owning a domain now. Get started by filling in the profiles attached to the domains." msgstr "" @@ -817,7 +817,7 @@ msgstr "" msgid "You can only add subdomains when the domain is unwrapped." msgstr "" -#: src/screens/Cart/index.tsx:122 +#: src/screens/Cart/index.tsx:123 msgid "You do not have enough funds" msgstr "" @@ -829,7 +829,7 @@ msgstr "" #~ msgid "Your <0>Name. Your <1>Power." #~ msgstr "" -#: src/screens/Cart/index.tsx:445 +#: src/screens/Cart/index.tsx:457 msgid "Your domains" msgstr "" diff --git a/src/locales/es/messages.po b/src/locales/es/messages.po index fcefd957..e8440b5d 100644 --- a/src/locales/es/messages.po +++ b/src/locales/es/messages.po @@ -94,8 +94,8 @@ msgstr "Al hacer clic en \"{actionName}\", se te pedirá una confirmación desde msgid "Cancel" msgstr "Cancelar" -#: src/App.tsx:150 -#: src/App.tsx:166 +#: src/App.tsx:152 +#: src/App.tsx:168 msgid "Cart" msgstr "Carrito" @@ -107,11 +107,11 @@ msgstr "Cambiar idioma" msgid "Change profile picture" msgstr "Cambiar foto de perfil" -#: src/screens/Cart/index.tsx:227 +#: src/screens/Cart/index.tsx:239 msgid "Clear all" msgstr "Limpiar todo" -#: src/screens/Profile/index.tsx:286 +#: src/screens/Profile/index.tsx:290 msgid "Clear search" msgstr "Limpiar búsqueda" @@ -139,15 +139,15 @@ msgstr "¡Colecciona e intercambia directamente o como NFTs!" msgid "Confirm" msgstr "Confirmar" -#: src/screens/Cart/index.tsx:381 +#: src/screens/Cart/index.tsx:393 msgid "Confirm and pay" msgstr "Confirmar y pagar" -#: src/screens/Cart/index.tsx:447 +#: src/screens/Cart/index.tsx:459 msgid "Confirmation" msgstr "Confirmación" -#: src/screens/Cart/index.tsx:409 +#: src/screens/Cart/index.tsx:421 msgid "Congrats on purchasing new domains!" msgstr "¡Felicidades por comprar nuevos dominios!" @@ -155,12 +155,12 @@ msgstr "¡Felicidades por comprar nuevos dominios!" #~ msgid "Connect your backpack username to your on-chain identity." #~ msgstr "Conecta tu nombre de usuario de Backpack con tu identidad en la cadena." -#: src/screens/Cart/index.tsx:315 +#: src/screens/Cart/index.tsx:327 msgid "Continue" msgstr "Continuar" -#: src/components/ProfileBlock.tsx:84 -#: src/components/ProfileBlock.tsx:96 +#: src/components/ProfileBlock.tsx:83 +#: src/components/ProfileBlock.tsx:95 #: src/screens/DomainView.tsx:617 msgid "Copied!" msgstr "Copiado!" @@ -203,7 +203,7 @@ msgstr "Discord" msgid "Discount" msgstr "Descuento" -#: src/screens/Cart/index.tsx:312 +#: src/screens/Cart/index.tsx:324 msgid "Discounts may be applied in the next step" msgstr "Los descuentos pueden aplicarse en el siguiente paso" @@ -215,8 +215,8 @@ msgstr "¡Descubre el dominio que te representa!" msgid "Domain name tokenization (wrapping), involves converting a domain name into an NFT. To reveal the original domain name, the token can be redeemed (unwrapped)." msgstr "La tokenización de un nombre de dominio (envuelto) implica convertir un nombre de dominio en un NFT. Para revelar el nombre de dominio original, el token puede ser redimido (desenvuelto)." -#: src/App.tsx:140 -#: src/screens/Profile/index.tsx:228 +#: src/App.tsx:142 +#: src/screens/Profile/index.tsx:232 msgid "Domains" msgstr "Dominios" @@ -224,7 +224,7 @@ msgstr "Dominios" msgid "Each additional kb of memory costs around 0.007 SOL (0.001 USDC)" msgstr "Cada kb adicional de memoria cuesta alrededor de 0.007 SOL (0.001 USDC)" -#: src/screens/Cart/index.tsx:267 +#: src/screens/Cart/index.tsx:279 #: src/screens/DomainView.tsx:571 #: src/screens/DomainView.tsx:691 msgid "Edit" @@ -304,7 +304,7 @@ msgid "" " start building your profile" msgstr "Obtenga un dominio .sol y empiece a crear su perfil ?" -#: src/screens/Cart/index.tsx:422 +#: src/screens/Cart/index.tsx:434 msgid "Get started with my profiles" msgstr "Comenzar con mis perfiles" @@ -349,13 +349,17 @@ msgstr "IPFS" msgid "Learn more in our docs" msgstr "Aprende más en nuestra documentación" -#: src/screens/Profile/index.tsx:228 +#: src/screens/Profile/index.tsx:232 msgid "My domains" msgstr "Mis dominios" #: src/screens/Profile/index.tsx:298 -msgid "My sub domains" -msgstr "Mis subdominios" +#~ msgid "My sub domains" +#~ msgstr "Mis subdominios" + +#: src/screens/Profile/index.tsx:302 +msgid "My subdomains" +msgstr "" #: src/components/TransferModal.tsx:80 msgid "New {domain}.sol owner" @@ -374,7 +378,7 @@ msgid "No changes to save" msgstr "No hay cambios que guardar" #: src/components/SearchModal.tsx:74 -#: src/screens/Profile/index.tsx:276 +#: src/screens/Profile/index.tsx:280 msgid "No domain found" msgstr "No se encontró ningún dominio" @@ -394,11 +398,11 @@ msgstr "Resumen del pedido" msgid "Ownership is verified" msgstr "La propiedad está verificada" -#: src/screens/Cart/index.tsx:325 +#: src/screens/Cart/index.tsx:337 msgid "Pay with" msgstr "Pagar con" -#: src/screens/Cart/index.tsx:446 +#: src/screens/Cart/index.tsx:458 msgid "Payment" msgstr "Pago" @@ -426,11 +430,11 @@ msgstr "PUNTO" msgid "Privacy Policy" msgstr "Política de privacidad" -#: src/App.tsx:129 +#: src/App.tsx:131 msgid "Profile" msgstr "Perfil" -#: src/screens/Profile/index.tsx:201 +#: src/screens/Profile/index.tsx:205 msgid "Profile completion: {percentage}%" msgstr "Finalización del perfil: {percentage}%" @@ -484,7 +488,7 @@ msgid "Search domains" msgstr "Buscar dominios" #: src/screens/HomeScreen.tsx:95 -#: src/screens/Profile/index.tsx:235 +#: src/screens/Profile/index.tsx:239 #: src/screens/SearchResult.tsx:77 msgid "Search for a domain" msgstr "Buscar un dominio" @@ -519,11 +523,11 @@ msgstr "Redes Sociales" msgid "Storage Size" msgstr "Tamaño de Almacenamiento" -#: src/screens/Cart/index.tsx:251 +#: src/screens/Cart/index.tsx:263 msgid "Storage:" msgstr "Almacenamiento:" -#: src/screens/Profile/index.tsx:298 +#: src/screens/Profile/index.tsx:302 msgid "Sub domains" msgstr "Subdominios" @@ -645,7 +649,7 @@ msgstr "Envolver en NFT" msgid "Wrap your domain into an NFT" msgstr "Envuelve tu dominio en un NFT" -#: src/screens/Cart/index.tsx:414 +#: src/screens/Cart/index.tsx:426 msgid "You can enjoy the full benefits of owning a domain now. Get started by filling in the profiles attached to the domains." msgstr "Ahora puedes disfrutar de todos los beneficios de ser dueño de un dominio. Comienza completando los perfiles asociados a los dominios." @@ -653,7 +657,7 @@ msgstr "Ahora puedes disfrutar de todos los beneficios de ser dueño de un domin msgid "You can only add subdomains when the domain is unwrapped." msgstr "Solo puedes agregar subdominios cuando el dominio no está envuelto en un NFT." -#: src/screens/Cart/index.tsx:122 +#: src/screens/Cart/index.tsx:123 msgid "You do not have enough funds" msgstr "No dispone de fondos suficientes" @@ -661,7 +665,7 @@ msgstr "No dispone de fondos suficientes" msgid "You don’t have any subdomains yet. You can create as many as you want to use your profiles for different purposes." msgstr "Aún no tienes subdominios. Puedes crear tantos como desees para usar tus perfiles con diferentes propósitos." -#: src/screens/Cart/index.tsx:445 +#: src/screens/Cart/index.tsx:457 msgid "Your domains" msgstr "Tus dominios" diff --git a/src/locales/fr/messages.po b/src/locales/fr/messages.po index 374aee6d..f1208bc5 100644 --- a/src/locales/fr/messages.po +++ b/src/locales/fr/messages.po @@ -92,8 +92,8 @@ msgstr "En cliquant sur \"{actionName}\", votre portefeuille vous demandera une msgid "Cancel" msgstr "Annuler" -#: src/App.tsx:150 -#: src/App.tsx:166 +#: src/App.tsx:152 +#: src/App.tsx:168 msgid "Cart" msgstr "Panier" @@ -105,11 +105,11 @@ msgstr "Changez la langue" msgid "Change profile picture" msgstr "Changez votre photo de profil" -#: src/screens/Cart/index.tsx:227 +#: src/screens/Cart/index.tsx:239 msgid "Clear all" msgstr "Tout effacer" -#: src/screens/Profile/index.tsx:286 +#: src/screens/Profile/index.tsx:290 msgid "Clear search" msgstr "Effacez la recherche" @@ -139,24 +139,24 @@ msgstr "" msgid "Confirm" msgstr "Confirmez" -#: src/screens/Cart/index.tsx:381 +#: src/screens/Cart/index.tsx:393 msgid "Confirm and pay" msgstr "Confirmer et payer" -#: src/screens/Cart/index.tsx:447 +#: src/screens/Cart/index.tsx:459 msgid "Confirmation" msgstr "Confirmation" -#: src/screens/Cart/index.tsx:409 +#: src/screens/Cart/index.tsx:421 msgid "Congrats on purchasing new domains!" msgstr "Félicitations pour l'achat de nouveaux domaines !" -#: src/screens/Cart/index.tsx:315 +#: src/screens/Cart/index.tsx:327 msgid "Continue" msgstr "Continuer" -#: src/components/ProfileBlock.tsx:84 -#: src/components/ProfileBlock.tsx:96 +#: src/components/ProfileBlock.tsx:83 +#: src/components/ProfileBlock.tsx:95 #: src/screens/DomainView.tsx:617 msgid "Copied!" msgstr "Copié!" @@ -199,7 +199,7 @@ msgstr "Discord" msgid "Discount" msgstr "Remise" -#: src/screens/Cart/index.tsx:312 +#: src/screens/Cart/index.tsx:324 msgid "Discounts may be applied in the next step" msgstr "Des remises peuvent être appliquées à l'étape suivante." @@ -211,8 +211,8 @@ msgstr "Découvrez le domaine qui vous représente !" msgid "Domain name tokenization (wrapping), involves converting a domain name into an NFT. To reveal the original domain name, the token can be redeemed (unwrapped)." msgstr "La tokenisation (enveloppement) de noms de domaine consiste à convertir un nom de domaine en NFT." -#: src/App.tsx:140 -#: src/screens/Profile/index.tsx:228 +#: src/App.tsx:142 +#: src/screens/Profile/index.tsx:232 msgid "Domains" msgstr "Domaines" @@ -220,7 +220,7 @@ msgstr "Domaines" msgid "Each additional kb of memory costs around 0.007 SOL (0.001 USDC)" msgstr "Chaque kb supplémentaire de mémoire coûte environ 0,007 SOL (0,001 USDC)." -#: src/screens/Cart/index.tsx:267 +#: src/screens/Cart/index.tsx:279 #: src/screens/DomainView.tsx:571 #: src/screens/DomainView.tsx:691 msgid "Edit" @@ -307,7 +307,7 @@ msgstr "" "\n" "" -#: src/screens/Cart/index.tsx:422 +#: src/screens/Cart/index.tsx:434 msgid "Get started with my profiles" msgstr "Commencez avec mes profils" @@ -352,13 +352,17 @@ msgstr "IPFS" msgid "Learn more in our docs" msgstr "En savoir plus dans nos docs" -#: src/screens/Profile/index.tsx:228 +#: src/screens/Profile/index.tsx:232 msgid "My domains" msgstr "Mes domaines" #: src/screens/Profile/index.tsx:298 -msgid "My sub domains" -msgstr "Mes sous-domaines" +#~ msgid "My sub domains" +#~ msgstr "Mes sous-domaines" + +#: src/screens/Profile/index.tsx:302 +msgid "My subdomains" +msgstr "" #: src/components/TransferModal.tsx:80 msgid "New {domain}.sol owner" @@ -382,7 +386,7 @@ msgid "No changes to save" msgstr "Aucuns changements à sauvegarder" #: src/components/SearchModal.tsx:74 -#: src/screens/Profile/index.tsx:276 +#: src/screens/Profile/index.tsx:280 msgid "No domain found" msgstr "Aucun domaine trouvé" @@ -402,11 +406,11 @@ msgstr "Résumé de la commande" msgid "Ownership is verified" msgstr "La propriété est vérifiée" -#: src/screens/Cart/index.tsx:325 +#: src/screens/Cart/index.tsx:337 msgid "Pay with" msgstr "Payer avec" -#: src/screens/Cart/index.tsx:446 +#: src/screens/Cart/index.tsx:458 msgid "Payment" msgstr "Paiement" @@ -440,11 +444,11 @@ msgstr "POINT" msgid "Privacy Policy" msgstr "Politique de confidentialité" -#: src/App.tsx:129 +#: src/App.tsx:131 msgid "Profile" msgstr "Profil" -#: src/screens/Profile/index.tsx:201 +#: src/screens/Profile/index.tsx:205 msgid "Profile completion: {percentage}%" msgstr "Avancement du profil : {pourcentage} %" @@ -498,7 +502,7 @@ msgid "Search domains" msgstr "Recherchez des domains" #: src/screens/HomeScreen.tsx:95 -#: src/screens/Profile/index.tsx:235 +#: src/screens/Profile/index.tsx:239 #: src/screens/SearchResult.tsx:77 msgid "Search for a domain" msgstr "Recherchez un domaine" @@ -533,11 +537,11 @@ msgstr "Réseaux sociaux" msgid "Storage Size" msgstr "Taille de stockage" -#: src/screens/Cart/index.tsx:251 +#: src/screens/Cart/index.tsx:263 msgid "Storage:" msgstr "Stockage:" -#: src/screens/Profile/index.tsx:298 +#: src/screens/Profile/index.tsx:302 msgid "Sub domains" msgstr "Sous-domaines" @@ -659,7 +663,7 @@ msgstr "Envelopper en NFT" msgid "Wrap your domain into an NFT" msgstr "Enveloppez votre domaine en NFT" -#: src/screens/Cart/index.tsx:414 +#: src/screens/Cart/index.tsx:426 msgid "You can enjoy the full benefits of owning a domain now. Get started by filling in the profiles attached to the domains." msgstr "Vous pouvez maintenant profiter pleinement des avantages de posséder un domaine. Commencez en remplissant les profils attachés aux domaines." @@ -667,7 +671,7 @@ msgstr "Vous pouvez maintenant profiter pleinement des avantages de posséder un msgid "You can only add subdomains when the domain is unwrapped." msgstr "Vous ne pouvez ajouter des sous-domaines que lorsque le domaine est désenveloppé." -#: src/screens/Cart/index.tsx:122 +#: src/screens/Cart/index.tsx:123 msgid "You do not have enough funds" msgstr "Vous n'avez pas assez de fonds" @@ -675,7 +679,7 @@ msgstr "Vous n'avez pas assez de fonds" msgid "You don’t have any subdomains yet. You can create as many as you want to use your profiles for different purposes." msgstr "Vous n'avez pas encore de sous-domaines. Vous pouvez en créer autant que vous le souhaitez pour utiliser vos profils à des fins différentes." -#: src/screens/Cart/index.tsx:445 +#: src/screens/Cart/index.tsx:457 msgid "Your domains" msgstr "Vos domaines" diff --git a/src/locales/kr/messages.po b/src/locales/kr/messages.po index 718e407d..cfe4405e 100644 --- a/src/locales/kr/messages.po +++ b/src/locales/kr/messages.po @@ -130,8 +130,8 @@ msgstr "{actionName}\"을(를) 클릭하면 지갑에서 승인 확인을 받게 msgid "Cancel" msgstr "취소" -#: src/App.tsx:150 -#: src/App.tsx:166 +#: src/App.tsx:152 +#: src/App.tsx:168 msgid "Cart" msgstr "장바구니" @@ -147,11 +147,11 @@ msgstr "프로필 사진 변경" #~ msgid "Choose a picture" #~ msgstr "사진을 선택하세요" -#: src/screens/Cart/index.tsx:227 +#: src/screens/Cart/index.tsx:239 msgid "Clear all" msgstr "모두 지우기" -#: src/screens/Profile/index.tsx:286 +#: src/screens/Profile/index.tsx:290 msgid "Clear search" msgstr "검색 지우기" @@ -179,15 +179,15 @@ msgstr "직접 수집 및 교환하거나 NFT로 교환하세요!" msgid "Confirm" msgstr "확인" -#: src/screens/Cart/index.tsx:381 +#: src/screens/Cart/index.tsx:393 msgid "Confirm and pay" msgstr "확인하고 결제하기" -#: src/screens/Cart/index.tsx:447 +#: src/screens/Cart/index.tsx:459 msgid "Confirmation" msgstr "확인" -#: src/screens/Cart/index.tsx:409 +#: src/screens/Cart/index.tsx:421 msgid "Congrats on purchasing new domains!" msgstr "새 도메인 구매를 축하합니다!" @@ -199,12 +199,12 @@ msgstr "새 도메인 구매를 축하합니다!" #~ msgid "Connect your backpack username to your on-chain identity." #~ msgstr "백팩 (Backpack) 사용자 이름을 온체인 신원과 연결하세요." -#: src/screens/Cart/index.tsx:315 +#: src/screens/Cart/index.tsx:327 msgid "Continue" msgstr "계속하기" -#: src/components/ProfileBlock.tsx:84 -#: src/components/ProfileBlock.tsx:96 +#: src/components/ProfileBlock.tsx:83 +#: src/components/ProfileBlock.tsx:95 #: src/screens/DomainView.tsx:617 msgid "Copied!" msgstr "복사 완료!" @@ -247,7 +247,7 @@ msgstr "디스코드" msgid "Discount" msgstr "할인" -#: src/screens/Cart/index.tsx:312 +#: src/screens/Cart/index.tsx:324 msgid "Discounts may be applied in the next step" msgstr "다음 단계에서 할인이 적용될 수 있습니다." @@ -259,8 +259,8 @@ msgstr "당신만의 도메인을 탐색하세요!" msgid "Domain name tokenization (wrapping), involves converting a domain name into an NFT. To reveal the original domain name, the token can be redeemed (unwrapped)." msgstr "도메인 이름 토큰화(래핑)는 도메인 이름을 NFT로 변환하는 것을 뜻 합니다. 원래 도메인 이름을 드러내려면 토큰을 인출(언래핑)할 수 있습니다." -#: src/App.tsx:140 -#: src/screens/Profile/index.tsx:228 +#: src/App.tsx:142 +#: src/screens/Profile/index.tsx:232 msgid "Domains" msgstr "도메인" @@ -268,7 +268,7 @@ msgstr "도메인" msgid "Each additional kb of memory costs around 0.007 SOL (0.001 USDC)" msgstr "메모리 1kb 추가당 비용은 약 0.007 SOL (0.001 USDC)입니다" -#: src/screens/Cart/index.tsx:267 +#: src/screens/Cart/index.tsx:279 #: src/screens/DomainView.tsx:571 #: src/screens/DomainView.tsx:691 msgid "Edit" @@ -362,7 +362,7 @@ msgstr "" ".sol 도메인을 구매하고\n" "프로필 작성을 시작하세요." -#: src/screens/Cart/index.tsx:422 +#: src/screens/Cart/index.tsx:434 msgid "Get started with my profiles" msgstr "내 프로필 작성 시작하기" @@ -432,18 +432,18 @@ msgstr "IPFS" msgid "Learn more in our docs" msgstr "문서로 더 알아보세요" -#: src/screens/Profile/index.tsx:228 +#: src/screens/Profile/index.tsx:232 msgid "My domains" msgstr "나의 도메인" #: src/screens/Profile/index.tsx:298 -msgid "My sub domains" -msgstr "나의 서브도메인" - -#: src/screens/Profile.tsx:248 -#~ msgid "My subdomains" +#~ msgid "My sub domains" #~ msgstr "나의 서브도메인" +#: src/screens/Profile/index.tsx:302 +msgid "My subdomains" +msgstr "나의 서브도메인" + #: src/components/TransferModal.tsx:80 msgid "New {domain}.sol owner" msgstr "새로운 {domain}.sol 소유자" @@ -461,7 +461,7 @@ msgid "No changes to save" msgstr "저장할 변경 사항이 없습니다" #: src/components/SearchModal.tsx:74 -#: src/screens/Profile/index.tsx:276 +#: src/screens/Profile/index.tsx:280 msgid "No domain found" msgstr "도메인을 찾을 수 없습니다" @@ -493,11 +493,11 @@ msgstr "주문 내역" msgid "Ownership is verified" msgstr "소유권이 확인되지 않았습니다" -#: src/screens/Cart/index.tsx:325 +#: src/screens/Cart/index.tsx:337 msgid "Pay with" msgstr "결제 방법" -#: src/screens/Cart/index.tsx:446 +#: src/screens/Cart/index.tsx:458 msgid "Payment" msgstr "결제" @@ -525,7 +525,7 @@ msgstr "포인트" msgid "Privacy Policy" msgstr "개인정보 보호정책" -#: src/App.tsx:129 +#: src/App.tsx:131 msgid "Profile" msgstr "프로필" @@ -533,7 +533,7 @@ msgstr "프로필" #~ msgid "Profile completed: {percentage}%" #~ msgstr "프로필 완료율: {percentage}%" -#: src/screens/Profile/index.tsx:201 +#: src/screens/Profile/index.tsx:205 msgid "Profile completion: {percentage}%" msgstr "프로필 완성도: {percentage}%" @@ -592,7 +592,7 @@ msgid "Search domains" msgstr "도메인 검색" #: src/screens/HomeScreen.tsx:95 -#: src/screens/Profile/index.tsx:235 +#: src/screens/Profile/index.tsx:239 #: src/screens/SearchResult.tsx:77 msgid "Search for a domain" msgstr "도메인을 검색하기" @@ -657,11 +657,11 @@ msgstr "소셜" msgid "Storage Size" msgstr "저장 용량" -#: src/screens/Cart/index.tsx:251 +#: src/screens/Cart/index.tsx:263 msgid "Storage:" msgstr "저장 용량:" -#: src/screens/Profile/index.tsx:298 +#: src/screens/Profile/index.tsx:302 msgid "Sub domains" msgstr "서브도메인" @@ -812,7 +812,7 @@ msgstr "NFT로 랩하기" msgid "Wrap your domain into an NFT" msgstr "당신의 도메인을 NFT로 랩하기" -#: src/screens/Cart/index.tsx:414 +#: src/screens/Cart/index.tsx:426 msgid "You can enjoy the full benefits of owning a domain now. Get started by filling in the profiles attached to the domains." msgstr "도메인에 연동된 프로필을 작성을 하므로서 도메인의 모든 혜택을 누리세요." @@ -820,7 +820,7 @@ msgstr "도메인에 연동된 프로필을 작성을 하므로서 도메인의 msgid "You can only add subdomains when the domain is unwrapped." msgstr "도메인이 언랩된 경우에만 서브도메인을 추가할 수 있습니다." -#: src/screens/Cart/index.tsx:122 +#: src/screens/Cart/index.tsx:123 msgid "You do not have enough funds" msgstr "자금이 부족합니다." @@ -832,7 +832,7 @@ msgstr "아직 보유하고 있는 서브도메인이 없습니다. 다양한 #~ msgid "Your <0>Name. Your <1>Power." #~ msgstr "당신의 <0>이름. 당신의 <1>선택." -#: src/screens/Cart/index.tsx:445 +#: src/screens/Cart/index.tsx:457 msgid "Your domains" msgstr "당신의 도메인" diff --git a/src/locales/tr/messages.po b/src/locales/tr/messages.po index f05925f9..72ec5e5f 100644 --- a/src/locales/tr/messages.po +++ b/src/locales/tr/messages.po @@ -94,8 +94,8 @@ msgstr "\"{actionName}\"ya tıklayınca cüzdan onayı vermeniz istenecektir. " msgid "Cancel" msgstr "İptal" -#: src/App.tsx:150 -#: src/App.tsx:166 +#: src/App.tsx:152 +#: src/App.tsx:168 msgid "Cart" msgstr "Araç" @@ -107,11 +107,11 @@ msgstr "Dili değiştir" msgid "Change profile picture" msgstr "Profil resmini değiştir" -#: src/screens/Cart/index.tsx:227 +#: src/screens/Cart/index.tsx:239 msgid "Clear all" msgstr "Tümünü temizle" -#: src/screens/Profile/index.tsx:286 +#: src/screens/Profile/index.tsx:290 msgid "Clear search" msgstr "Aramaları temizle" @@ -139,15 +139,15 @@ msgstr "Topla ve doğrudan ya da NFT halinde takas et!" msgid "Confirm" msgstr "Onayla" -#: src/screens/Cart/index.tsx:381 +#: src/screens/Cart/index.tsx:393 msgid "Confirm and pay" msgstr "Onayla ve öde" -#: src/screens/Cart/index.tsx:447 +#: src/screens/Cart/index.tsx:459 msgid "Confirmation" msgstr "Onay" -#: src/screens/Cart/index.tsx:409 +#: src/screens/Cart/index.tsx:421 msgid "Congrats on purchasing new domains!" msgstr "Yeni domain satın alımlarınız için tebrikler!" @@ -155,12 +155,12 @@ msgstr "Yeni domain satın alımlarınız için tebrikler!" #~ msgid "Connect your backpack username to your on-chain identity." #~ msgstr "Backpack kullanıcı isminizi zincir üstü kimlikle eşleştirin." -#: src/screens/Cart/index.tsx:315 +#: src/screens/Cart/index.tsx:327 msgid "Continue" msgstr "İlerle" -#: src/components/ProfileBlock.tsx:84 -#: src/components/ProfileBlock.tsx:96 +#: src/components/ProfileBlock.tsx:83 +#: src/components/ProfileBlock.tsx:95 #: src/screens/DomainView.tsx:617 msgid "Copied!" msgstr "Kopyalandı" @@ -203,7 +203,7 @@ msgstr "Discord" msgid "Discount" msgstr "İndirim" -#: src/screens/Cart/index.tsx:312 +#: src/screens/Cart/index.tsx:324 msgid "Discounts may be applied in the next step" msgstr "İndirimler sonraki adımda hesaba katılacaktır" @@ -215,8 +215,8 @@ msgstr "Seni yansıtan domaini keşfet!" msgid "Domain name tokenization (wrapping), involves converting a domain name into an NFT. To reveal the original domain name, the token can be redeemed (unwrapped)." msgstr "Domain ismini tokenize edilmesi (wrapping), domain isminin NFT'ye dönüşümüdür. Asıl domain isminin tekrardan elde edilmesi için tokenin geri katlanması (unwrapping) gereklidir. " -#: src/App.tsx:140 -#: src/screens/Profile/index.tsx:228 +#: src/App.tsx:142 +#: src/screens/Profile/index.tsx:232 msgid "Domains" msgstr "Domainler" @@ -224,7 +224,7 @@ msgstr "Domainler" msgid "Each additional kb of memory costs around 0.007 SOL (0.001 USDC)" msgstr "Her bir fazladan kb hafıza 0.007 SOL ya da 0.001 USDC masraf çıkartır." -#: src/screens/Cart/index.tsx:267 +#: src/screens/Cart/index.tsx:279 #: src/screens/DomainView.tsx:571 #: src/screens/DomainView.tsx:691 msgid "Edit" @@ -304,7 +304,7 @@ msgid "" " start building your profile" msgstr "Bir .sol domain edinin ve profilinizi oluşturmaya başlayın" -#: src/screens/Cart/index.tsx:422 +#: src/screens/Cart/index.tsx:434 msgid "Get started with my profiles" msgstr "Profillerim kısmından başlayın" @@ -349,12 +349,16 @@ msgstr "IPFS" msgid "Learn more in our docs" msgstr "Dokümanlarımızı okuyarak daha fazla bilgi edinin" -#: src/screens/Profile/index.tsx:228 +#: src/screens/Profile/index.tsx:232 msgid "My domains" msgstr "Domainlerim" #: src/screens/Profile/index.tsx:298 -msgid "My sub domains" +#~ msgid "My sub domains" +#~ msgstr "" + +#: src/screens/Profile/index.tsx:302 +msgid "My subdomains" msgstr "" #: src/components/TransferModal.tsx:80 @@ -374,7 +378,7 @@ msgid "No changes to save" msgstr "Kaydedilecek değişiklik yok" #: src/components/SearchModal.tsx:74 -#: src/screens/Profile/index.tsx:276 +#: src/screens/Profile/index.tsx:280 msgid "No domain found" msgstr "Domain bulunamadı" @@ -394,11 +398,11 @@ msgstr "Emir geçmişi" msgid "Ownership is verified" msgstr "" -#: src/screens/Cart/index.tsx:325 +#: src/screens/Cart/index.tsx:337 msgid "Pay with" msgstr "ile öde" -#: src/screens/Cart/index.tsx:446 +#: src/screens/Cart/index.tsx:458 msgid "Payment" msgstr "Ödeme" @@ -426,11 +430,11 @@ msgstr "PUAN" msgid "Privacy Policy" msgstr "" -#: src/App.tsx:129 +#: src/App.tsx:131 msgid "Profile" msgstr "Profil" -#: src/screens/Profile/index.tsx:201 +#: src/screens/Profile/index.tsx:205 msgid "Profile completion: {percentage}%" msgstr "Profil tamamlama: {percentage}%" @@ -484,7 +488,7 @@ msgid "Search domains" msgstr "Domainler ara" #: src/screens/HomeScreen.tsx:95 -#: src/screens/Profile/index.tsx:235 +#: src/screens/Profile/index.tsx:239 #: src/screens/SearchResult.tsx:77 msgid "Search for a domain" msgstr "Domain için arama yap" @@ -519,11 +523,11 @@ msgstr "Sosyal Medya Hesapları" msgid "Storage Size" msgstr "Depo Hacmi" -#: src/screens/Cart/index.tsx:251 +#: src/screens/Cart/index.tsx:263 msgid "Storage:" msgstr "Depo" -#: src/screens/Profile/index.tsx:298 +#: src/screens/Profile/index.tsx:302 msgid "Sub domains" msgstr "" @@ -645,7 +649,7 @@ msgstr "NFT'ye katla (wrapping)" msgid "Wrap your domain into an NFT" msgstr "Domaini, NFT'ye katla (wrapping)" -#: src/screens/Cart/index.tsx:414 +#: src/screens/Cart/index.tsx:426 msgid "You can enjoy the full benefits of owning a domain now. Get started by filling in the profiles attached to the domains." msgstr "Artık bir domaine sahip olmanın tüm avantajlarından faydalanabilirsin. Domainle ilişkilendirilmiş profili doldurarak başla." @@ -653,7 +657,7 @@ msgstr "Artık bir domaine sahip olmanın tüm avantajlarından faydalanabilirsi msgid "You can only add subdomains when the domain is unwrapped." msgstr "Yalnızca domain katlanmamış (unwrapped) haldeyken subdomain ekleyebilirsin." -#: src/screens/Cart/index.tsx:122 +#: src/screens/Cart/index.tsx:123 msgid "You do not have enough funds" msgstr "Yeterli bakiyeye sahip değilsiniz" @@ -661,7 +665,7 @@ msgstr "Yeterli bakiyeye sahip değilsiniz" msgid "You don’t have any subdomains yet. You can create as many as you want to use your profiles for different purposes." msgstr "Herhangi bir subdomaine sahip değilsiniz. Farklı profillerinizde farklı amaçlarda kullanmak üzere istediğiniz kadar subdomain oluşturabilirsiniz. " -#: src/screens/Cart/index.tsx:445 +#: src/screens/Cart/index.tsx:457 msgid "Your domains" msgstr "Domainleriniz" diff --git a/src/locales/zh-Hans/messages.po b/src/locales/zh-Hans/messages.po index b30f8bf6..bb1f2a2d 100644 --- a/src/locales/zh-Hans/messages.po +++ b/src/locales/zh-Hans/messages.po @@ -90,8 +90,8 @@ msgstr "点击\"{actionName}\",在您的钱包中完成确认" msgid "Cancel" msgstr "取消" -#: src/App.tsx:150 -#: src/App.tsx:166 +#: src/App.tsx:152 +#: src/App.tsx:168 msgid "Cart" msgstr "购物车" @@ -103,11 +103,11 @@ msgstr "更换语言" msgid "Change profile picture" msgstr "更换个人头像" -#: src/screens/Cart/index.tsx:227 +#: src/screens/Cart/index.tsx:239 msgid "Clear all" msgstr "清除所有" -#: src/screens/Profile/index.tsx:286 +#: src/screens/Profile/index.tsx:290 msgid "Clear search" msgstr "清除搜索记录" @@ -131,24 +131,24 @@ msgstr "直接收藏、交易或封装成 NFT!" msgid "Confirm" msgstr "确认" -#: src/screens/Cart/index.tsx:381 +#: src/screens/Cart/index.tsx:393 msgid "Confirm and pay" msgstr "确认并支付" -#: src/screens/Cart/index.tsx:447 +#: src/screens/Cart/index.tsx:459 msgid "Confirmation" msgstr "确认" -#: src/screens/Cart/index.tsx:409 +#: src/screens/Cart/index.tsx:421 msgid "Congrats on purchasing new domains!" msgstr "祝贺您成功购买新域名!" -#: src/screens/Cart/index.tsx:315 +#: src/screens/Cart/index.tsx:327 msgid "Continue" msgstr "继续" -#: src/components/ProfileBlock.tsx:84 -#: src/components/ProfileBlock.tsx:96 +#: src/components/ProfileBlock.tsx:83 +#: src/components/ProfileBlock.tsx:95 #: src/screens/DomainView.tsx:617 msgid "Copied!" msgstr "已复制!" @@ -191,7 +191,7 @@ msgstr "Discord" msgid "Discount" msgstr "折扣" -#: src/screens/Cart/index.tsx:312 +#: src/screens/Cart/index.tsx:324 msgid "Discounts may be applied in the next step" msgstr "您可在下一步使用折扣" @@ -203,8 +203,8 @@ msgstr "发现能代表你的域名!" msgid "Domain name tokenization (wrapping), involves converting a domain name into an NFT. To reveal the original domain name, the token can be redeemed (unwrapped)." msgstr "域名通证化(封装)是指将域名转换为 NFT,如果您需要将其恢复为原始域名,可通过转换(解开封装)该通证完成操作。" -#: src/App.tsx:140 -#: src/screens/Profile/index.tsx:228 +#: src/App.tsx:142 +#: src/screens/Profile/index.tsx:232 msgid "Domains" msgstr "域名" @@ -212,7 +212,7 @@ msgstr "域名" msgid "Each additional kb of memory costs around 0.007 SOL (0.001 USDC)" msgstr "每额外增加的1kb内存需花费约0.007 SOL(0.001 USDC)" -#: src/screens/Cart/index.tsx:267 +#: src/screens/Cart/index.tsx:279 #: src/screens/DomainView.tsx:571 #: src/screens/DomainView.tsx:691 msgid "Edit" @@ -294,7 +294,7 @@ msgstr "" "获取 .sol 域名并 \n" " 开始构建您的个人资料" -#: src/screens/Cart/index.tsx:422 +#: src/screens/Cart/index.tsx:434 msgid "Get started with my profiles" msgstr "从个人资料开始" @@ -339,13 +339,17 @@ msgstr "IPFS" msgid "Learn more in our docs" msgstr "在docs中学习更多内容" -#: src/screens/Profile/index.tsx:228 +#: src/screens/Profile/index.tsx:232 msgid "My domains" msgstr "我的域名" #: src/screens/Profile/index.tsx:298 -msgid "My sub domains" -msgstr "我的子域名" +#~ msgid "My sub domains" +#~ msgstr "我的子域名" + +#: src/screens/Profile/index.tsx:302 +msgid "My subdomains" +msgstr "" #: src/components/TransferModal.tsx:80 msgid "New {domain}.sol owner" @@ -364,7 +368,7 @@ msgid "No changes to save" msgstr "无需保存更改" #: src/components/SearchModal.tsx:74 -#: src/screens/Profile/index.tsx:276 +#: src/screens/Profile/index.tsx:280 msgid "No domain found" msgstr "未找到域名" @@ -384,11 +388,11 @@ msgstr "订单摘要" msgid "Ownership is verified" msgstr "所有权已验证" -#: src/screens/Cart/index.tsx:325 +#: src/screens/Cart/index.tsx:337 msgid "Pay with" msgstr "支付方式" -#: src/screens/Cart/index.tsx:446 +#: src/screens/Cart/index.tsx:458 msgid "Payment" msgstr "支付方式" @@ -416,11 +420,11 @@ msgstr "积分" msgid "Privacy Policy" msgstr "隐私条款" -#: src/App.tsx:129 +#: src/App.tsx:131 msgid "Profile" msgstr "个人账户" -#: src/screens/Profile/index.tsx:201 +#: src/screens/Profile/index.tsx:205 msgid "Profile completion: {percentage}%" msgstr "个人资料完成度: {percentage}%" @@ -474,7 +478,7 @@ msgid "Search domains" msgstr "搜索域名" #: src/screens/HomeScreen.tsx:95 -#: src/screens/Profile/index.tsx:235 +#: src/screens/Profile/index.tsx:239 #: src/screens/SearchResult.tsx:77 msgid "Search for a domain" msgstr "搜索域名" @@ -509,11 +513,11 @@ msgstr "社交媒体" msgid "Storage Size" msgstr "存储容量" -#: src/screens/Cart/index.tsx:251 +#: src/screens/Cart/index.tsx:263 msgid "Storage:" msgstr "存储容量:" -#: src/screens/Profile/index.tsx:298 +#: src/screens/Profile/index.tsx:302 msgid "Sub domains" msgstr "子域名" @@ -635,7 +639,7 @@ msgstr "封装为NFT" msgid "Wrap your domain into an NFT" msgstr "将你的域名封装成NFT" -#: src/screens/Cart/index.tsx:414 +#: src/screens/Cart/index.tsx:426 msgid "You can enjoy the full benefits of owning a domain now. Get started by filling in the profiles attached to the domains." msgstr "现在开始您可以尽情享受拥有域名的益处。从填写域名相关个人资料开始使用。" @@ -643,7 +647,7 @@ msgstr "现在开始您可以尽情享受拥有域名的益处。从填写域名 msgid "You can only add subdomains when the domain is unwrapped." msgstr "只有在域名解开封装后才能添加子域名。" -#: src/screens/Cart/index.tsx:122 +#: src/screens/Cart/index.tsx:123 msgid "You do not have enough funds" msgstr "您的资金不足" @@ -651,7 +655,7 @@ msgstr "您的资金不足" msgid "You don’t have any subdomains yet. You can create as many as you want to use your profiles for different purposes." msgstr "您还没有任何子域名。您可以创建任意数量的子域名,以便将您的个人资料用于不同的用途。" -#: src/screens/Cart/index.tsx:445 +#: src/screens/Cart/index.tsx:457 msgid "Your domains" msgstr "你的域名" diff --git a/src/screens/Cart/index.tsx b/src/screens/Cart/index.tsx index e448f692..bb86177a 100644 --- a/src/screens/Cart/index.tsx +++ b/src/screens/Cart/index.tsx @@ -43,6 +43,7 @@ import { Screen } from "@src/components/Screen"; import { UiButton } from "@src/components/UiButton"; import { EmptyState } from "./EmptyState"; import { useStatusModalContext } from "@src/contexts/StatusModalContext"; +import { QueryKeys, queryClient } from "@src/lib"; const getTokenAccountBalance = async ( connection: Connection, @@ -98,7 +99,7 @@ export const Cart = () => { 0, ); - const price = pyth.result?.get(mint)?.price; + const price = pyth.data?.get(mint)?.price; const total = totalUsd / (price || 1); @@ -173,6 +174,17 @@ export const Cart = () => { setLoading(false); goSuccessStep(); + + await queryClient.invalidateQueries({ + predicate: (query: any) => + [ + QueryKeys.domainsList, + QueryKeys.domainInfo, + QueryKeys.subdomains, + QueryKeys.subdomainsFromUser, + ].includes(query?.queryKey?.[0]), + refetchType: "all", + }); } catch (err) { setLoading(false); handleError(err); diff --git a/src/screens/DomainView.tsx b/src/screens/DomainView.tsx index e418cf10..2dafd853 100644 --- a/src/screens/DomainView.tsx +++ b/src/screens/DomainView.tsx @@ -118,27 +118,27 @@ export const DomainView = ({ domain }: { domain: string }) => { const picRecord = useProfilePic(connection!, domain); const { publicKey } = useWallet(); - const isOwner = domainInfo.result?.owner === publicKey?.toBase58(); + const isOwner = domainInfo.data?.owner === publicKey?.toBase58(); const isSubdomain = domain?.split(".").length === 2; const hasSubdomain = - subdomains.result !== undefined && subdomains.result.length !== 0; - const isTokenized = domainInfo.result?.isTokenized; + subdomains.data !== undefined && subdomains.data.length !== 0; + const isTokenized = domainInfo.data?.isTokenized; const loading = socialRecords.loading || addressRecords.loading || - domainInfo.loading || + domainInfo.isLoading || picRecord.loading || - subdomains.loading; + subdomains.isLoading; const refresh = async () => { await Promise.allSettled([ - domainInfo.execute(), + domainInfo.refetch(), socialRecords?.execute(), addressRecords?.execute(), picRecord.execute(), - subdomains.execute(), + subdomains.refetch(), ]); }; @@ -421,7 +421,7 @@ export const DomainView = ({ domain }: { domain: string }) => { openModal("TokenizeModal", { - refresh: () => domainInfo.execute(), + refresh: () => domainInfo.refetch(), domain, isTokenized, isOwner, @@ -451,7 +451,7 @@ export const DomainView = ({ domain }: { domain: string }) => { @@ -462,7 +462,7 @@ export const DomainView = ({ domain }: { domain: string }) => { onPress={() => openModal("Transfer", { domain, - refresh: () => domainInfo.execute(), + refresh: () => domainInfo.refetch(), }) } small @@ -477,7 +477,7 @@ export const DomainView = ({ domain }: { domain: string }) => { onPress={() => openModal("Delete", { domain, - refresh: () => domainInfo.execute(), + refresh: () => domainInfo.refetch(), }) } small @@ -491,7 +491,7 @@ export const DomainView = ({ domain }: { domain: string }) => { openModal("TokenizeModal", { domain, isTokenized, - refresh: () => domainInfo.execute(), + refresh: () => domainInfo.refetch(), isOwner, }) } @@ -750,7 +750,7 @@ export const DomainView = ({ domain }: { domain: string }) => { {hasSubdomain ? ( { result: picRecordsList = [], execute: refreshPic, loading: picLoading, - } = useRecordsV2(connection!, favorite.result?.reverse!, [Record.Pic], true); + } = useRecordsV2(connection!, favorite.data?.reverse!, [Record.Pic], true); const picRecord = useMemo(() => { const picRecord = picRecordsList.find( @@ -68,24 +68,25 @@ export const ProfileScreen = ({ owner }: { owner?: string }) => { const isOwner = owner === publicKey?.toBase58(); - const completedStep = (progress?.result || [])?.filter( - (e) => !!e.value, - ).length; + const completedStep = (progress?.data || [])?.filter((e) => !!e.value).length; const percentage = Math.floor((100 * completedStep) / 6); const showProgress = percentage !== 100; const refresh = async () => { await Promise.allSettled([ - favorite.execute(), - progress.execute(), + favorite.refetch(), + progress.refetch(), refreshPic(), - subdomains.execute(), + subdomains.refetch(), ]); }; const loading = - domains.loading || picLoading || progress.loading || subdomains.loading; + domains.isLoading || + picLoading || + progress.isLoading || + subdomains.isLoading; useEffect(() => { refresh().then(); @@ -98,13 +99,11 @@ export const ProfileScreen = ({ owner }: { owner?: string }) => { }, [connected]); const subsOnly = useMemo(() => { - if (!subdomains.result) return []; - return subdomains.result + if (!subdomains.data) return []; + return subdomains.data ?.filter( (sub) => - !domains.result?.some( - (e) => e.domain === sub.subdomain.split(".")[1], - ), + !domains.data?.some((e) => e.domain === sub.subdomain.split(".")[1]), ) .map((e) => { const domain = e.subdomain.split(".")[1]; @@ -114,18 +113,23 @@ export const ProfileScreen = ({ owner }: { owner?: string }) => { domain, }; }); - }, [domains.status, domains.loading, subdomains.status, subdomains.loading]); + }, [ + domains.status, + domains.isLoading, + subdomains.status, + subdomains.isLoading, + ]); const domainsList = useMemo(() => { - if (!domains.result) return []; + if (!domains.data) return []; - const domainsResult = domains.result.map((item) => { + const domainsResult = domains.data.map((item) => { const relatedSubdomains: SubdomainResult[] = []; // Find subdomains related to domain - if (subdomains.result) { + if (subdomains.data) { relatedSubdomains.push( - ...subdomains.result.filter( + ...subdomains.data.filter( (sub) => sub.subdomain.split(".")[1] === item.domain, ), ); @@ -135,22 +139,22 @@ export const ProfileScreen = ({ owner }: { owner?: string }) => { ...item, // Just a double-check that domain pubkey is correct key: - favorite.result?.reverse === item.domain - ? favorite.result.domain.toBase58() + favorite.data?.reverse === item.domain + ? favorite.data.domain.toBase58() : item.key, subdomains: relatedSubdomains, }; }); return domainsResult.sort((a, b) => - a!.domain === favorite.result?.reverse ? -1 : 1, + a!.domain === favorite.data?.reverse ? -1 : 1, ); }, [ domains.status, - domains.loading, - favorite.result?.reverse, + domains.isLoading, + favorite.data?.reverse, subdomains.status, - subdomains.loading, + subdomains.isLoading, ]); const filteredSubdomainsList = useMemo(() => { @@ -189,9 +193,9 @@ export const ProfileScreen = ({ owner }: { owner?: string }) => { { { {filteredSubdomainsList.length > 0 && ( - {isOwner ? t`My sub domains` : t`Sub domains`} + {isOwner ? t`My subdomains` : t`Sub domains`} {showPopularDomains && topDomainsSales ? ( <> - {topDomainsSales.loading && } - {!topDomainsSales.loading && ( + {topDomainsSales.isLoading && } + {!topDomainsSales.isLoading && ( (