diff --git a/lang/ca.json b/lang/ca.json index 2f394f4855..3e3643fede 100644 --- a/lang/ca.json +++ b/lang/ca.json @@ -121,6 +121,7 @@ "label.accepts_funds_on": "Aceptan finançament en", "label.actions": "Accions", "label.activate_project": "ACTIVAR PROJECTE", + "label.active_round": "Ronda activa", "label.active_streams_subheader": "Qualsevol transmissió activa que hagi realitzat amb Superfluid fora del lloc web de Giveth pot afectar les estimacions mostrades en aquesta pàgina. Per veure una llista completa de totes les vostres transmisions de Superfluid, consulteu el vostre", "label.activity_and_milestones": "Metes, Activitats i Impacte", "label.add_address": "Afegir adreça", @@ -163,7 +164,7 @@ "label.anonymous": "Anònim", "label.an_economy_of_giving": "Una Economia del Giving", "label.an_equivalent_of_up_to_40%": "Un equivalent de fins al 40% de l'import de la donació en tokens GIV!", - "label.an_evolution_in_community_fundrising": "Una evolució en la recaptació de fons per a comunitats.", + "label.an_evolution_in_community_fundrising": "Una evolució en el suport a donacions a entitats benèfiques amb captació de fons comunitària.", "label.an_exploit_has_removed_available_rewards": "Una vulnerabilitat ha eliminat les recompenses disponibles d'aquesta pool. Si us plau, consulta", "label.an_impactful_game_connecting_donors_and_projects": "Un joc d'impacte que connecta donants i projectes. ", "label.apply_now": "Aplica ara", @@ -172,6 +173,7 @@ "label.approve_pending": "Aprovació pendent", "label.approving": "Aprovant", "label.archived": "Arxivat", + "label.archived_rounds": "Rondes arxivades", "label.archive_donation": "Arxivar donació", "label.archive_stream": "Arxiva el Stream", "label.are_eligible_to_be_matched": "són elegibles per ser aparellats.", @@ -297,7 +299,7 @@ "label.deposit_token_use_balance": "Diposita Tokens o utilitza el Saldo de Transmissió", "label.didnt_get_the_givdrop": "No has rebut el GIVdrop?", "label.discover_our_roadmap": "descobreix la nostra planificació estratègica", - "label.discover_what_makes_giveth_different": "Descobreix què diferencia a Giveth d'altres plataformes de donacions", + "label.discover_what_makes_giveth_different": "Descobreix què fa diferent a Giveth d'altres plataformes de donacions cripto", "label.dismiss": "Descartar", "label.displayed_in_the_header_of_the_project": "Es mostrarà a la capçalera de la pàgina del teu projecte.", "label.docs": "docs", @@ -414,7 +416,7 @@ "label.get_more_giv": "Obté més GIV", "label.get_more_givpower": "Obtén més GIVpower", "label.get_more_givpower_by_staking": "Aconsegueix més GIVpower fent staking i bloquejant més tokens GIV.", - "label.get_rewarded_for_giving": "Obtingues recompenses al donar a projectes verificats que donen suport als béns públics.", + "label.get_rewarded_for_giving": "Obtén recompenses per donar a projectes de béns públics verificats amb donacions en cripto.", "label.get_started": "Començar", "label.get_your_donations_matched": "Aconsegueix les teves donacions igualades!", "label.become_project_nominator": "Converteix-te en un Nominador de Projectes", @@ -438,7 +440,7 @@ "label.giveth_builds_community.bullet.one": "Giveth és una comunitat inclusiva unida per un objectiu comú.", "label.giveth_builds_community.bullet.three": "Giveth fomenta la confiança dins de les comunitats augmentant la transparència i la responsabilitat a través de la tecnologia blockchain.", "label.giveth_builds_community.bullet.two": "Giveth és una plataforma propietat de la comunitat, que construeix i desenvolupa les seves aplicacions descentralitzades basant-se en el feedback dels seus membres.", - "label.giveth_empowers_changemakers": "Giveth empodera als creadors amb finançament evolutiu.", + "label.giveth_empowers_changemakers": "Giveth empodera als agents de canvi per acceptar donacions en cripto.", "label.giveth_encourages_decentralization": "Giveth promou la descentralització", "label.giveth_encourages_decentralization.bullet.one": "Giveth ofereix solucions innovadores de codi obert construïdes amb tecnologia blockchain, que és inherentment descentralitzada.", "label.giveth_encourages_decentralization.bullet.two": "Giveth és pionera i experimenta amb tècniques de governança i comunicació descentralitzades i fomenta la seva adopció per altres comunitats.", @@ -536,14 +538,14 @@ "label.insufficient_funds": "Fons insuficients", "label.invalid_ens_address": "Adreça ENS no vàlida", "label.in_december_2021": "al desembre de 2021 va proporcionar una nova manera de finançar les nostres iniciatives per evolucionar la filantropia.", - "label.in_order_to_ensure_that_you_are_a_representative": "Per assegurar-nos que ets realment un representant de l'organització/projecte pel qual estàs aplicant, us demanem que publiquis un enllaç al teu projecte de Giveth al compte de X (Twitter) o de les xarxes socials de l'organització. Proporciona aquí un enllaç a la publicació a X (Twitter) o xarxes socials.", + "label.in_order_to_ensure_that_you_are_a_representative": "Per assegurar-nos que realment ets un representant del projecte pel qual estàs sol·licitant, et demanem que publiquis o compartisques un enllaç al teu projecte de Giveth des del Twitter de l'organització, el lloc web, Github o un altre fòrum públic propietat de l'organització.", "label.is_already_being_used_for_a_project": "ja s'està utilitzant per a un projecte", "label.is_your_project_part_of_a_non_profit": "El teu projecte forma part d'una organització sense ànim de lucre registrada?", "label.i_accept_all_giveth_tos": "Accepto tots els termes i condicions de la comunitat de Giveth.", "label.i_dont_want_to_support_giveth": "No vull donar suport a Giveth amb la meva donació", "label.join_desc_one": "Giveth és, sobretot, una comunitat de donants i creadors de canvi. Som persones apassionades que treballen juntes per construir un sistema cripto-econòmic que pugui recompensar les donacions a bones causes. El nostre projecte és de codi obert, descentralitzat, altruista i dirigit per la comunitat.", "label.join_desc_two": "Pots unir-te a la nostra Community Call cada dijous a Discord, seguir les nostres xarxes socials o venir a saludar a un canal a continuació. Esperem donar-te la benvinguda!", - "label.join_our_community_driven_movement": "Uneix-te al nostre moviment impulsat per la comunitat per transformar la manera en què finançem les organitzacions sense ànim de lucre i les causes socials.", + "label.join_our_community_driven_movement": "Uneix-te al nostre moviment impulsat per la comunitat per transformar la manera com financem organitzacions sense ànim de lucre i causes socials utilitzant estratègies innovadores de captació de fons en cripto.", "label.join_our_discord": "uneix-te al nostre Discord", "label.join_page": "Uniu-vos a la comunitat", "label.join_us": "Uneix-te a Nosaltres", @@ -575,6 +577,7 @@ "label.liked_projects": "Projectes Favorits", "label.likes": "Favorits", "label.link_to_your_giveth_project": "Enllaç al teu projecte de Giveth a les teves xarxes socials", + "label.project_social_link": "Enllaç Social del Projecte", "label.liquid_giv_that_has_already_flowed": "GIV líquid que ja ha fluït del GIVstream", "label.liquid_reward_token_that_has_flowed": "{rewardTokenSymbol} líquid que ha fluït del {rewardTokenSymbol}stream", "label.listing": "Llistat", @@ -643,7 +646,7 @@ "label.newest": "Més nou", "label.newly_published_projects": "Projectes publicats recentment", "label.new_stream_balance": "Nou Saldo de Transmissió", - "label.new_to_crypto": "Nou a cripto? És fàcil començar a Giveth.", + "label.new_to_crypto": "Nou en la captació de fons en cripto? És fàcil començar a Giveth.", "label.new_update": "NOVA ACTUALITZACIÓ", "label.next": "Següent", "label.no": "No", @@ -940,7 +943,7 @@ "label.successfull_recurring_donation_1": "Podeu modificar o eliminar la vostra donació recurrent, així com recarregar fons al saldo del vostre flux des del ", "label.successfull_recurring_donation_2": "Per aprendre més sobre com funcionen les donacions recurrents, visiteu el nostre ", "label.suggested_image_size": "Mida d'imatge suggerida:", - "label.suggested_image_size_min": "Mida d'imatge suggerida mínima de 600 píxels d'amplada. Mida d'imatge fins a 4 Mb.", + "label.suggested_image_size_min": "Mida d'imatge suggerida: 960px d'ample per 600px d'alt. La mida màxima de la imatge és de 4MB.", "label.superfluid_eligible_tokens": "Tokens Dipositables", "label.superfluid_eligible_tokens_description": "Diposita un token des de la teva cartera al teu Saldo de Transmissió per finançar les teves donacions recurrents.", "label.support": "Suport", @@ -1052,7 +1055,7 @@ "label.to_see_your_givpower_please_connect": "Per veure el teu GIVpower, si us plau connecta la teva cartera.", "label.traceable_project": "Projecte Traçable", "label.transaction_status": "Estat de la transacció", - "label.trust_that_your_donations_will_make": "Confia que les teves donacions tindran un impacte amb el nostre sistema de verificació.", + "label.trust_that_your_donations_will_make": "Confia que les teves donacions en cripto tindran un impacte amb el nostre sistema de verificació.", "label.try_removing_some_filters_keyword": "Intenta eliminar alguns filtres o utilitzar un altre mot clau.", "label.try_these": "Prova aquests", "label.try_to_use_this_structure": "Intenta utilitzar aquesta estructura com a guia a l'hora d'escriure la descripció", @@ -1159,7 +1162,7 @@ "label.your_application_has_been_submitted.two": " L'equip de verificació us enviarà un correu electrònic una vegada que hagi estat revisada.", "label.your_cummulative_apr_including_both_rewards": "El vostre APR acumulat, incloent totes les recompenses obtingudes a través de les taxes i les afegides automàticament a la vostra posició,", "label.your_current_wallet_is_associated_with_a_giveth_project": "La teva cartera actualment connectada està associada amb un projecte Giveth, per tant, les donacions fetes des d'aquesta adreça no són elegibles per a GIVbacks.", - "label.your_donations_and_participation_in_the_giveconomy": "Les teves donacions i la teva participació en la GIVeconomia ens permeten construir un nou futur on els projectes d'impacte en el món real es beneficien de les seves pròpies economies regeneratives impulsades per la comunitat.", + "label.your_donations_and_participation_in_the_giveconomy": "Les teves donacions en cripto, i la participació en la GIVeconomy, ens permeten construir un nou futur on els projectes d'impacte real es beneficien de les seves pròpies economies cripto regeneratives impulsades per la comunitat.", "label.your_donation_can_qualify_for_matching_1": "Només les donacions fetes a", "label.your_donation_can_qualify_for_matching_2": "són elegibles per igualar a la y", "label.your_donation_is_being_processed": "La seva donació s'està processant", @@ -1408,7 +1411,7 @@ "page.home.nice_swag": "Visita la botiga de marca", "page.home.philanthropy_needs_more": "La filantropia necessita més innovació.", "page.home.philanthropy_needs_more_desc_1": "I si fer donacions fos mutuament beneficiós, i les organitzacions sense ànim de lucre poguessin evolucionar la seva captació de fons per maximitzar l'impacte?", - "page.home.philanthropy_needs_more_desc_2": "Giveth està construint un nou camí endavant amb la nostra plataforma de donacions impulsada per la comunitat, sense comissions i basada en la tecnologia blockchain, aprofitant el poder de la tecnologia blockchain per connectar projectes sobre el terreny amb", + "page.home.philanthropy_needs_more_desc_2": "Giveth està construint un nou camí endavant amb la nostra donació cripto sense comissions, una plataforma de donacions impulsada per la comunitat - aprofitant el poder de la tecnologia blockchain per connectar projectes sobre el terreny amb", "page.home.philanthropy_needs_more_desc_3": "oportunitats de finançament regeneratiu.", "page.home.section.calling_all_change_makers": "Cridant a tots els Changemakers!", "page.home.section.calling_all_change_makers.description": "Crea el teu projecte a Giveth per aprofitar les oportunitats de finançament revolucionàries de l'ecosistema Ethereum. Comença a recaptar fons en qüestió de minuts. La creació d'un projecte és totalment gratuïta!", @@ -1509,6 +1512,7 @@ "page.verification.before_you_start.six": "Se et demanarà que proporcioneu una llista de totes les adreces de cartera utilitzades per gestionar els fons dins del vostre projecte.", "page.verification.before_you_start.three": "El senzill", "page.verification.before_you_start.two": "Una vegada que el teu projecte estigui verificat, els Givers que donin al teu projecte seran recompensats amb tokens GIV que podran utilitzar per participar en la GIVeconomy. D'altra banda, se't demanarà que publiquis actualitzacions periòdiques sobre el teu projecte, si no la teva insígnia de verificació podria ser revocada després de 3 mesos sense actualitzacions.", + "page.verification.click_to_edit": "Fes clic aquí per editar el teu projecte.", "page.verification.managing_funds.four": "Si us plau, proporciona adreces de cartera addicionals utilitzades per gestionar fons dins del teu projecte.", "page.verification.managing_funds.one": "Els fons recaptats es preveu que siguin utilitzats per a benefici públic i no per a benefici personal. Com utilitzaràs els fons que reculli el teu projecte?", "page.verification.managing_funds.three": "Adreça addicional", @@ -1524,6 +1528,7 @@ "page.verification.tos.one": "Prometo que els fons recaptats seran utilitzats per a benefici públic, no per a benefici personal.", "page.verification.tos.three": "Només acceptarem noves donacions externes a través de Giveth, i entenem que si es descobreix que estem recirculant els nostres propis fons a través de Giveth, això es considerarà abús del sistema.", "page.verification.tos.two": "Entenem que Giveth analitzarà totes les donacions per detectar fraus o abusos. Si hi ha alguna sospita d'abús, entenem que podem perdre el nostre estat de verificació, els nostres donants poden no rebre GIVbacks i Giveth pot compartir públicament qualsevol evidència de frau.", + "page.verification.update_your_project_social": "Actualitza els detalls del teu projecte per proporcionar qualsevol enllaç rellevant a les xarxes socials.", "partnerships": "Asociacions", "peace-and-justice": "Pau i Justícia", "poverity": "Pobresa", diff --git a/lang/en.json b/lang/en.json index 25b9808430..2fcb0324c2 100644 --- a/lang/en.json +++ b/lang/en.json @@ -121,6 +121,7 @@ "label.accepts_funds_on": "Accepts funds on", "label.actions": "Actions", "label.activate_project": "Activate project", + "label.active_round": "Active Round", "label.active_streams_subheader": "Any active streams you made with Superfluid outside of the Giveth website may affect the estimations shown on this page. To see a complete list of all your Superfluid streams check out your", "label.activity_and_milestones": "Goals, Activities and Impact", "label.add_address": "Add address", @@ -163,7 +164,7 @@ "label.anonymous": "Anonymous", "label.an_economy_of_giving": "An Economy of Giving", "label.an_equivalent_of_up_to_40%": "An equivalent of up to 40% of the donation amount in GIV tokens!", - "label.an_evolution_in_community_fundrising": "An evolution in community fundraising.", + "label.an_evolution_in_community_fundrising": "An evolution in supporting donations to charity with community fundraising.", "label.an_exploit_has_removed_available_rewards": "An exploit has removed available rewards from this pool. Please refer to", "label.an_impactful_game_connecting_donors_and_projects": "An impactful game connecting donors and projects. ", "label.apply_now": "Apply now", @@ -172,6 +173,7 @@ "label.approve_pending": "Approve pending", "label.approving": "Approving", "label.archived": "Archived", + "label.archived_rounds": "Archived Rounds", "label.archive_donation": "Archive donation", "label.archive_stream": "Archive Stream", "label.are_eligible_to_be_matched": "are eligible to be matched.", @@ -241,6 +243,7 @@ "label.claim_your_givdrop": "Claim your GIVdrop", "label.clear": "Clear", "label.clear_all_filters": "Clear all Filters", + "page.verification.click_to_edit": "Click here to edit your project.", "label.close": "Close", "label.community": "Community", "label.community_connection": "Community Connection", @@ -297,7 +300,7 @@ "label.deposit_token_use_balance": "Deposit Tokens or use Stream Balance", "label.didnt_get_the_givdrop": "Didn’t get the GIVdrop?", "label.discover_our_roadmap": "discover our roadmap", - "label.discover_what_makes_giveth_different": "Discover what makes Giveth different from other donation platforms", + "label.discover_what_makes_giveth_different": "Discover what makes Giveth different from other crypto donation platforms", "label.dismiss": "Dismiss", "label.displayed_in_the_header_of_the_project": "Displayed in the header of the project page.", "label.docs": "docs", @@ -414,7 +417,7 @@ "label.get_more_giv": "Get more GIV", "label.get_more_givpower": "Get more GIVpower", "label.get_more_givpower_by_staking": "Get more GIVpower by staking & locking more GIV tokens.", - "label.get_rewarded_for_giving": "Get rewarded for giving to verified public goods projects.", + "label.get_rewarded_for_giving": "Get rewarded for giving to verified public goods projects with crypto donations.", "label.get_started": "Get Started", "label.get_your_donations_matched": "Get your donations matched!", "label.become_project_nominator": "Become a Project Nominator", @@ -438,7 +441,7 @@ "label.giveth_builds_community.bullet.one": "Giveth is an inclusive community united around a common goal.", "label.giveth_builds_community.bullet.three": "Giveth enables trust within communities by increasing transparency and accountability through blockchain technology.", "label.giveth_builds_community.bullet.two": "Giveth is a community-owned platform, building and developing our DApps based on feedback from our members.", - "label.giveth_empowers_changemakers": "Giveth empowers changemakers with evolutionary funding.", + "label.giveth_empowers_changemakers": "Giveth empowers changemakers to accept crypto donations.", "label.giveth_encourages_decentralization": "Giveth encourages Decentralization", "label.giveth_encourages_decentralization.bullet.one": "Giveth offers innovative open-source solutions built on blockchain technology, which is inherently decentralized.", "label.giveth_encourages_decentralization.bullet.two": "Giveth is pioneering and experimenting with decentralized governance and communication techniques and supporting their adoption by other communities.", @@ -536,14 +539,14 @@ "label.insufficient_funds": "Insufficient funds", "label.invalid_ens_address": "Invalid ENS address", "label.in_december_2021": "in December 2021 provided a new way to fund our initiatives to evolve philanthropy.", - "label.in_order_to_ensure_that_you_are_a_representative": "In order to ensure that you are actually a representative of the organization/project you're applying for, we ask that you post a link to your Giveth project on the organization's X (Twitter) or social media account. Please provide a link to the X (Twitter) or social media post here.", + "label.in_order_to_ensure_that_you_are_a_representative": "In order to ensure that you are actually a representative of the project you're applying for, we ask that you post/share a link to your Giveth project from the organization's Twitter, website, Github or other public forum owned by the organization.", "label.is_already_being_used_for_a_project": "is already being used for a project", "label.is_your_project_part_of_a_non_profit": "Is your project part of a registered non-profit organization?", "label.i_accept_all_giveth_tos": "I accept all of the Giveth community terms and conditions.", "label.i_dont_want_to_support_giveth": "I do not want to support Giveth with my donation", "label.join_desc_one": "Giveth is first and foremost a community of givers and changemakers. We are passionate people working together to build a crypto-economic system that can reward giving to good causes. Our project is open-source, decentralized, altruistic, and community-led.", "label.join_desc_two": "You can join our Community Call every Thursday in Discord, follow our social media, or come say hello in a channel below. We look forward to welcoming you!", - "label.join_our_community_driven_movement": "Join our community-driven movement to transform the way we fund nonprofits and social causes.", + "label.join_our_community_driven_movement": "Join our community-driven movement to transform the way we fund nonprofits and social causes using innovative crypto fundraising strategies.", "label.join_our_discord": "join our discord", "label.join_page": "Join Page", "label.join_us": "Join Us", @@ -575,6 +578,7 @@ "label.liked_projects": "Liked Projects", "label.likes": "Likes", "label.link_to_your_giveth_project": "Link to your Giveth project on your social media", + "label.project_social_link": "Project Social Link", "label.liquid_giv_that_has_already_flowed": "Liquid GIV that has already flowed out of the GIVstream", "label.liquid_reward_token_that_has_flowed": "Liquid {rewardTokenSymbol} that has already flowed out of the {rewardTokenSymbol}stream", "label.listing": "Listing", @@ -643,7 +647,7 @@ "label.newest": "Newest", "label.newly_published_projects": "Newly published projects", "label.new_stream_balance": "New Stream Balance", - "label.new_to_crypto": "New to crypto? It’s easy to get started on Giveth.", + "label.new_to_crypto": "New to crypto fundraising? It’s easy to get started on Giveth.", "label.new_update": "NEW UPDATE", "label.next": "Next", "label.no": "No", @@ -787,10 +791,10 @@ "label.recurring_donations_currently_only_available_on_optimism": "Recurring donations are currently only available on Optimism", "label.recurring_donation_card_subheader_1": "Stream your donations over time to provide continuous funding.", "label.recurring_donation_card_subheader_2": "Decide the number of tokens to deposit in your stream balance, or utilize your existing stream balance(s). Set the monthly donation amount in tokens and begin streaming.", - "label.recurring_dontion_page" : "recurring donation page", - "label.recurring_donation_setup_1" : "Your project has now been created, next you will need to sign a transaction to enable it to receive recurring donations.", - "label.recurring_donation_setup_2" : "You'll be prompted to sign a transaction which will execute the setup on ", - "label.recurring_donation_updated_hours" :"Recurring donation amounts are updated every 24 hours.", + "label.recurring_dontion_page": "recurring donation page", + "label.recurring_donation_setup_1": "Your project has now been created, next you will need to sign a transaction to enable it to receive recurring donations.", + "label.recurring_donation_setup_2": "You'll be prompted to sign a transaction which will execute the setup on ", + "label.recurring_donation_updated_hours": "Recurring donation amounts are updated every 24 hours.", "label.refer_a_friend": "Refer a friend, earn $GIV tokens for every donation.", "label.refer_your_friends": "Refer your friends", "label.refer_your_friends_and_earn_giv": "Refer your friends and earn GIV when they donate", @@ -940,7 +944,7 @@ "label.successfull_recurring_donation_1": "You can modify or delete your recurring donation as well as top-up funds to your stream balance from the ", "label.successfull_recurring_donation_2": "To learn more about how recurring donations work, visit our ", "label.suggested_image_size": "Suggested image size:", - "label.suggested_image_size_min": "Suggested image size: min. 600px width. Max image size is 4MB.", + "label.suggested_image_size_min": "Suggested image size: 960px width by 600px height. Max image size is 4MB.", "label.superfluid_eligible_tokens": "Depositable Tokens", "label.superfluid_eligible_tokens_description": "Deposit a token from your wallet into your Stream Balance to fund your recurring donations.", "label.support": "Support", @@ -1052,7 +1056,7 @@ "label.to_see_your_givpower_please_connect": "To see your GIVpower, please connect your wallet.", "label.traceable_project": "Traceable Project", "label.transaction_status": "Transaction Status", - "label.trust_that_your_donations_will_make": "Trust that your donations will make an impact with our verification system.", + "label.trust_that_your_donations_will_make": "Trust that your crypto donations will make an impact with our verification system.", "label.try_removing_some_filters_keyword": "Try removing some filters or using another keyword.", "label.try_these": "Try these", "label.try_to_use_this_structure": "Try to use this structure as a guide when writing the description", @@ -1159,7 +1163,7 @@ "label.your_application_has_been_submitted.two": " The Verification Team will send an email once it has been reviewed.", "label.your_cummulative_apr_including_both_rewards": "Your cumulative APR including both rewards earned as fees & added automatically to your position", "label.your_current_wallet_is_associated_with_a_giveth_project": "Your currently connected wallet address is associated with a Giveth project, therefore donations made from this address are not eligible for GIVbacks.", - "label.your_donations_and_participation_in_the_giveconomy": "Your donations, and participation in the GIVeconomy, enables us to build a new future where real world impact projects benefit from their own community-driven regenerative economies.", + "label.your_donations_and_participation_in_the_giveconomy": "Your crypto donations, and participation in the GIVeconomy, enables us to build a new future where real world impact projects benefit from their own community-driven regenerative crypto economies.", "label.your_donation_can_qualify_for_matching_1": "Only donations made on", "label.your_donation_can_qualify_for_matching_2": "are eligible for matching in the", "label.your_donation_is_being_processed": "Your donation is being processed", @@ -1408,7 +1412,7 @@ "page.home.nice_swag": "Check out the swag shop", "page.home.philanthropy_needs_more": "Philanthropy needs more innovation.", "page.home.philanthropy_needs_more_desc_1": "What if donating were mutually beneficial, and nonprofits could evolve their fundraising to maximize impact?", - "page.home.philanthropy_needs_more_desc_2": "Giveth is building a new way forward with our zero-fee, community-driven donation platform - leveraging the power of blockchain technology to connect on-the-ground projects with", + "page.home.philanthropy_needs_more_desc_2": "Giveth is building a new way forward with our zero-fee crypto donation, community-driven donation platform - leveraging the power of blockchain technology to connect on-the-ground projects with", "page.home.philanthropy_needs_more_desc_3": "regenerative funding opportunities.", "page.home.section.calling_all_change_makers": "Calling all Changemakers!", "page.home.section.calling_all_change_makers.description": "Establish your project on Giveth to tap into the revolutionary funding opportunities of the Ethereum Ecosystem. Start raising funds within minutes. Creating a project is absolutely free!", @@ -1524,6 +1528,7 @@ "page.verification.tos.one": "I pledge that funds raised will be used for public benefit, not for personal gain.", "page.verification.tos.three": "We will only accept new, external donations through Giveth, and we understand that if we are found to be recirculating our own funds through Giveth this will be considered abuse of the system.", "page.verification.tos.two": "We understand that Giveth will be analyzing all donations looking for fraud or abuse. If there is any reason to suspect abuse, we understand that we may lose our verified status, our donors may not receive GIVbacks and that Giveth may share any evidence of fraud publicly.", + "page.verification.update_your_project_social": "Update your project details to provide any relevant social media links.", "partnerships": "Partnerships", "peace-and-justice": "Peace & Justice", "poverity": "Poverty", diff --git a/lang/es.json b/lang/es.json index d4705dae85..2891f72409 100644 --- a/lang/es.json +++ b/lang/es.json @@ -121,6 +121,7 @@ "label.accepts_funds_on": "Aceptan financiación en", "label.actions": "Acciones", "label.activate_project": "ACTIVAR PROYECTO", + "label.active_round": "Ronda Activa", "label.active_streams_subheader": "Cualquier transmisión activa que haya realizado con Superfluid fuera del sitio web de Giveth puede afectar las estimaciones mostradas en esta página. Para ver una lista completa de todas sus transmisiones de Superfluid, consulte su", "label.activity_and_milestones": "Metas, Actividades e Impacto", "label.add_address": "Añadir dirección", @@ -163,7 +164,7 @@ "label.anonymous": "Anónimo", "label.an_economy_of_giving": "Una Economia del \"Giving\"", "label.an_equivalent_of_up_to_40%": "Un equivalente de hasta 40% del monto de la donación en GIV tokens!", - "label.an_evolution_in_community_fundrising": "Una evolución en la recaudación de fondos para comunidades.", + "label.an_evolution_in_community_fundrising": "Una evolución en el apoyo a donaciones a la caridad con recaudación de fondos comunitaria.", "label.an_exploit_has_removed_available_rewards": "Un explot ha removido las recompensas disponibles de este pool. Por favor refiérase a", "label.an_impactful_game_connecting_donors_and_projects": "Un juego de impacto que conecta donantes y proyectos. ", "label.apply_now": "Aplica ahora", @@ -172,6 +173,7 @@ "label.approve_pending": "Aprobación pendiente", "label.approving": "Aprobando", "label.archived": "Archivado", + "label.archived_rounds": "Rondas Archivadas", "label.archive_donation": "Archivar donación", "label.archive_stream": "Archivar Transmisión", "label.are_eligible_to_be_matched": "son elegibles para ser complementadas.", @@ -297,7 +299,7 @@ "label.deposit_token_use_balance": "Deposita Tokens o usa el Saldo de Transmisión", "label.didnt_get_the_givdrop": "¿No has recibido el GIVdrop?", "label.discover_our_roadmap": "descubre nuestra hoja de ruta", - "label.discover_what_makes_giveth_different": "Descubre qué diferencía a Giveth de otras plataformas de donaciones", + "label.discover_what_makes_giveth_different": "Descubre qué hace diferente a Giveth de otras plataformas de donación en criptomonedas", "label.dismiss": "Ignorar", "label.displayed_in_the_header_of_the_project": "Se mostrará en la cabecera de la página de tu proyecto.", "label.docs": "documentos", @@ -414,7 +416,7 @@ "label.get_more_giv": "Obtenga más GIV", "label.get_more_givpower": "Obtén más GIVpower", "label.get_more_givpower_by_staking": "Obtén más GIVpower haciendo staking y bloqueando GIV tokens.", - "label.get_rewarded_for_giving": "Obtén recompensas al donar a proyectos verificados que apoyan a los bienes públicos.", + "label.get_rewarded_for_giving": "Recibe recompensas por donar a proyectos verificados de bienes públicos con donaciones en criptomonedas.", "label.get_started": "Comienza", "label.get_your_donations_matched": "Consigue que tus donaciones se igualen!", "label.become_project_nominator": "Conviértete en un Nominador de Proyectos", @@ -438,7 +440,7 @@ "label.giveth_builds_community.bullet.one": "Giveth es una comunidad inclusiva unida alrededor de un fin común.", "label.giveth_builds_community.bullet.three": "Giveth promueve la confianza dentro de las comunidades aumentando la transparencia y la rendición de cuentas a través de la tecnología blockchain.", "label.giveth_builds_community.bullet.two": "Giveth es una plataforma del dominio de la comunidad, creamos y desarrollamos nuestras dApps en función de la retroalimentación de nuestra comunidad.", - "label.giveth_empowers_changemakers": "Giveth empodera a los agentes de cambio con financiación evolutiva.", + "label.giveth_empowers_changemakers": "Giveth empodera a los agentes de cambio para aceptar donaciones en criptomonedas.", "label.giveth_encourages_decentralization": "Giveth promueve la descentralización", "label.giveth_encourages_decentralization.bullet.one": "Giveth ofrece soluciones innovadoras y de código abierto construidas con tecnología blockchain, que es descentralizada por naturaleza.", "label.giveth_encourages_decentralization.bullet.two": "Giveth está liderando y experimentando con gobernanza descentralizada y técnicas de comunicación promoviendo la adopción de otras comunidades.", @@ -536,14 +538,14 @@ "label.insufficient_funds": "Fondos insuficientes", "label.invalid_ens_address": "Dirección ENS inválida", "label.in_december_2021": "en diciembre de 2021 proporcionó una nueva forma de financiar nuestras iniciativas y así evolucionar la filantropía.", - "label.in_order_to_ensure_that_you_are_a_representative": "Para asegurarnos de que realmente eres el representante de la organización/proyecto para el que estás aplicando, te pedimos que publiques un enlace a tu proyecto Giveth en la cuenta de X (Twitter) o de las redes sociales de la organización. Proporciona aquí un enlace a la publicación en X (Twitter) o en las redes sociales.", + "label.in_order_to_ensure_that_you_are_a_representative": "Para asegurarnos de que realmente eres un representante del proyecto para el que estás solicitando, te pedimos que publiques o compartas un enlace a tu proyecto de Giveth desde el Twitter de la organización, el sitio web, Github u otro foro público propiedad de la organización.", "label.is_already_being_used_for_a_project": "esta siendo usada por otro proyecto", "label.is_your_project_part_of_a_non_profit": "¿Tu proyecto es parte de una organización sin ánimo de lucro registrada?", "label.i_accept_all_giveth_tos": "Acepto todos los términos y condiciones de la comunidad de Giveth.", "label.i_dont_want_to_support_giveth": "No deseo apoyar a Giveth con mi donación", "label.join_desc_one": "Giveth es, ante todo, una comunidad de donantes y agentes de cambio. Somos personas apasionadas que trabajan juntas para construir un sistema cripto-económico que pueda recompensar las donaciones a buenas causas. Nuestro proyecto es de código abierto, descentralizado, altruista y dirigido por la comunidad.", "label.join_desc_two": "Puedes entrar a nuestra Community Call todos los jueves en Discord, sigue nuestras redes sociales o ven a saludarnos en alguno de los canales de abajo. ¡Estaremos encantados de recibirte!", - "label.join_our_community_driven_movement": "Únete a nuestro movimiento impulsado por la comunidad para transformar la forma en que financiamos las organizaciones sin fines de lucro y las causas sociales.", + "label.join_our_community_driven_movement": "Únete a nuestro movimiento impulsado por la comunidad para transformar la manera en que financiamos organizaciones sin fines de lucro y causas sociales utilizando estrategias innovadoras de recaudación de fondos con criptomonedas.", "label.join_our_discord": "únete a nuestro Discord", "label.join_page": "Únete a la comunidad", "label.join_us": "Únete a Nosotros", @@ -575,6 +577,7 @@ "label.liked_projects": "Proyectos Favoritos", "label.likes": "Favoritos", "label.link_to_your_giveth_project": "Enlace al proyecto de Giveth en sus redes sociales", + "label.project_social_link": "Proyecto Enlace Social", "label.liquid_giv_that_has_already_flowed": "GIV liquido que ya ha fluido de tu GIVstream", "label.liquid_reward_token_that_has_flowed": "{rewardTokenSymbol} liquido que ha fluido del {rewardTokenSymbol}stream", "label.listing": "Listado", @@ -643,7 +646,7 @@ "label.newest": "Más nuevo", "label.newly_published_projects": "Proyectos recientemente publicados", "label.new_stream_balance": "Nuevo Saldo de Transmisión", - "label.new_to_crypto": "¿Nuevo en cripto? Es fácil comenzar en Giveth.", + "label.new_to_crypto": "¿Eres nuevo en la recaudación de fondos con criptomonedas? Es fácil comenzar en Giveth.", "label.new_update": "NUEVA ACTUALIZACIÓN", "label.next": "Siguiente", "label.no": "No", @@ -940,7 +943,7 @@ "label.successfull_recurring_donation_1": "Puede modificar o eliminar su donación recurrente, así como recargar fondos en el saldo de su transmisión desde el ", "label.successfull_recurring_donation_2": "Para aprender más sobre cómo funcionan las donaciones recurrentes, visite nuestro ", "label.suggested_image_size": "Tamaño de imagen sugerido:", - "label.suggested_image_size_min": "Tamaño minimo de imagen sugerido de 600px de ancho. Máximo 4Mb de peso.", + "label.suggested_image_size_min": "Tamaño de imagen sugerido: 960px de ancho por 600px de alto. El tamaño máximo de la imagen es de 4MB.", "label.superfluid_eligible_tokens": "Tokens Depositables", "label.superfluid_eligible_tokens_description": "Deposita un token desde tu billetera en tu Saldo de Transmisión para financiar tus donaciones recurrentes.", "label.support": "Soporte", @@ -1052,7 +1055,7 @@ "label.to_see_your_givpower_please_connect": "Para ver tu GIVpower, por favor conecta tu billetera.", "label.traceable_project": "Proyecto Traceable", "label.transaction_status": "Estado de Transacción", - "label.trust_that_your_donations_will_make": "Confía en que tus donaciones tendrán un impacto con nuestro sistema de verificación.", + "label.trust_that_your_donations_will_make": "Confía en que tus donaciones en criptomonedas tendrán un impacto con nuestro sistema de verificación.", "label.try_removing_some_filters_keyword": "Intenta eliminar algunos filtros o usar otra palabra clave.", "label.try_these": "Intenta estos", "label.try_to_use_this_structure": "Intenta usar esta estructura como guía al momento de escribir la descripción", @@ -1159,7 +1162,7 @@ "label.your_application_has_been_submitted.two": " El Equipo de Verificación le enviará un email una vez que haya sido evaluado.", "label.your_cummulative_apr_including_both_rewards": "Tu APR acumulado incluyendo recompensas obtenidas de los fees y aquellos añadidos automáticamente a tu posición", "label.your_current_wallet_is_associated_with_a_giveth_project": "Su billetera actualmente conectada está asociada con un proyecto Giveth, por lo tanto, las donaciones realizadas desde esta dirección no son elegibles para GIVbacks.", - "label.your_donations_and_participation_in_the_giveconomy": "Tus donaciones y tu participación en la GIVeconomy nos permiten construir un nuevo futuro donde los proyectos de impacto en el mundo real se benefician de sus propias economías regenerativas impulsadas por la comunidad.", + "label.your_donations_and_participation_in_the_giveconomy": "Tus donaciones en criptomonedas y tu participación en la GIVeconomía nos permiten construir un nuevo futuro donde los proyectos de impacto real se benefician de sus propias economías cripto regenerativas impulsadas por la comunidad.", "label.your_donation_can_qualify_for_matching_1": "Sólo las donaciones realizadas en", "label.your_donation_can_qualify_for_matching_2": "son elegibles para igualar en el", "label.your_donation_is_being_processed": "Su donación está siendo procesada", @@ -1408,7 +1411,7 @@ "page.home.nice_swag": "Mira nuestro swag shop", "page.home.philanthropy_needs_more": "La filantropía necesita más innovación.", "page.home.philanthropy_needs_more_desc_1": "¿Qué pasaría si las donaciones fueran mutuamente beneficiosas y las organizaciones sin fines de lucro pudieran desarrollar su recaudación de fondos para maximizar el impacto?", - "page.home.philanthropy_needs_more_desc_2": "Giveth está creando una nueva forma con nuestra plataforma de donaciones sin comisiones e impulsada por la comunidad, aprovechando el poder de la tecnología blockchain para conectar proyectos en el terreno con", + "page.home.philanthropy_needs_more_desc_2": "Giveth está construyendo un nuevo camino hacia adelante con nuestra plataforma de donación comunitaria sin comisiones en criptomonedas, aprovechando el poder de la tecnología blockchain para conectar proyectos en terreno con", "page.home.philanthropy_needs_more_desc_3": "oportunidades de financiación regenerativa.", "page.home.section.calling_all_change_makers": "Llamando a todos los Changemakers!", "page.home.section.calling_all_change_makers.description": "Crea tu proyecto en Giveth para aprovechar la revolucionarias oportunidades de financiación del ecosistema Ethereum. Comience a recaudar fondos en minutos. Creando un proyecto es absolutamente gratis!", @@ -1509,6 +1512,7 @@ "page.verification.before_you_start.six": "Se te pedirá que proporciones una lista de todas las direcciones de billeteras utilizadas para gestionar fondos dentro de tu proyecto.", "page.verification.before_you_start.three": "El simple", "page.verification.before_you_start.two": "Una vez verificado tu proyecto, los Givers que donen a tu proyecto serán recompensados con tokens GIV que podrán utilizar para participar en la GIVeconomy. Por otra parte, se te pedirá que publiques actualizaciones periódicas sobre tu proyecto, de lo contrario la insignia de verificado podría ser revocada después de 3 meses sin actualizaciones.", + "page.verification.click_to_edit": "Haz clic aquí para editar tu proyecto.", "page.verification.managing_funds.four": "Por favor, proporcione direcciones de billeteras adicionales utilizadas para administrar los fondos dentro de su proyecto.", "page.verification.managing_funds.one": "Se espera que los fondos recaudados se utilicen para beneficio público y no para beneficio personal. ¿Cómo utilizará los fondos que recaude su proyecto?", "page.verification.managing_funds.three": "Dirección adicional", @@ -1524,6 +1528,7 @@ "page.verification.tos.one": "Prometo que los fondos recaudados se utilizarán para beneficio público y no para beneficio personal.", "page.verification.tos.three": "Solo aceptaremos donaciones externas y nuevas a través de Giveth, y entendemos que si se descubre que estamos re circulando nuestros propios fondos a través de Giveth, esto se considerará abuso del sistema.", "page.verification.tos.two": "Entendemos que Giveth analizará todas las donaciones en busca de fraude o abuso. Si hay algún motivo para sospechar abuso, entendemos que podemos perder nuestro estado de verificación, es posible que nuestros donantes no reciban GIVbacks y que Giveth puede compartir públicamente cualquier evidencia de fraude.", + "page.verification.update_your_project_social": "Actualiza los detalles de tu proyecto para proporcionar cualquier enlace relevante a las redes sociales.", "partnerships": "Asociaciones", "peace-and-justice": "Paz & Justicia", "poverity": "Pobreza", diff --git a/next.config.js b/next.config.js index ae5ef75dc9..ff45bea733 100644 --- a/next.config.js +++ b/next.config.js @@ -10,6 +10,8 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ var pjson = require('./package.json'); const generateRobotsTxt = require('./scripts/generate-robots-txt'); +const isProduction = process.env.NEXT_PUBLIC_ENV === 'production'; + const defaultLocale = 'en'; const locales = ['ca', 'en', 'es']; @@ -23,6 +25,12 @@ const moduleExports = withBundleAnalyzer({ { protocol: 'https', port: '', hostname: 'static.tgbwidget.com' }, { protocol: 'https', port: '', hostname: 'images.unsplash.com' }, { protocol: 'https', port: '', hostname: 'unicorn.mypinata.cloud' }, + { protocol: 'https', port: '', hostname: 'images.ctfassets.net' }, + { + protocol: 'https', + port: '', + hostname: 'lh3.googleusercontent.com', + }, { protocol: 'https', port: '', @@ -62,7 +70,7 @@ const moduleExports = withBundleAnalyzer({ // }, }, redirects: () => { - return [ + const redirects = [ { source: '/user', destination: '/account', @@ -84,16 +92,6 @@ const moduleExports = withBundleAnalyzer({ destination: '/projects/all', permanent: true, }, - { - source: '/qf', - destination: '/projects/all', - permanent: false, - }, - { - source: '/qf/all', - destination: '/projects/all', - permanent: false, - }, { source: '/QuadraticForce', destination: '/assets/Giveth_Report_QF_2024.this.one.pdf', @@ -106,6 +104,29 @@ const moduleExports = withBundleAnalyzer({ permanent: false, }, ]; + + if (isProduction) { + redirects.push( + { + source: '/qf', + destination: '/projects/all', + permanent: false, + }, + { + source: '/qf/all', + destination: '/projects/all', + permanent: false, + }, + ); + } else { + redirects.push({ + source: '/qf', + destination: '/qf/all', + permanent: false, + }); + } + + return redirects; }, webpack: (config, { isServer, dev }) => { if (isServer && !dev) { diff --git a/package.json b/package.json index d4787b3d7e..666d37e01e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "givethdapp", - "version": "2.25.4", + "version": "2.26.4", "private": true, "scripts": { "build": "next build", @@ -17,9 +17,9 @@ "@types/react-dom": "^18.0.6" }, "dependencies": { - "@apollo/client": "^3.9.3", + "@apollo/client": "^3.10.4", "@giveth/ui-design-system": "^1.11.27", - "@reduxjs/toolkit": "^2.1.0", + "@reduxjs/toolkit": "^2.2.4", "@safe-global/api-kit": "^2.1.0", "@segment/snippet": "^4.15.3", "@sentry/nextjs": "^7.100.1", @@ -29,12 +29,11 @@ "@solana/wallet-adapter-react-ui": "^0.9.35", "@solana/wallet-adapter-wallets": "^0.19.26", "@solana/web3.js": "^1.90.0", - "@superfluid-finance/sdk-core": "^0.6.12", - "@tanstack/react-query": "^5.18.1", - "@uniswap/v3-sdk": "^3.10.2", + "@superfluid-finance/sdk-core": "^0.7.0", + "@tanstack/react-query": "^5.36.0", "@vercel/speed-insights": "^1.0.9", "@web3auth/sign-in-with-solana": "^3.0.0", - "@web3modal/wagmi": "^4.0.1", + "@web3modal/wagmi": "^4.2.0", "apollo-upload-client": "^18.0.1", "base58": "^2.0.1", "bignumber.js": "^9.1.2", @@ -44,7 +43,7 @@ "graphql": "^16.8.1", "lodash.isequal": "^4.5.0", "lottie-react": "^2.4.0", - "next": "^14.1.0", + "next": "^14.2.3", "nprogress": "^0.2.0", "quill": "^1.3.7", "quill-emoji": "^0.2.0", @@ -52,26 +51,26 @@ "quill-magic-url": "^4.2.0", "rc-scrollbars": "^1.1.6", "rc-slider": "^10.5.0", - "react": "^18.2.0", + "react": "^18.3.1", "react-datepicker": "^6.1.0", - "react-dom": "^18.2.0", + "react-dom": "^18.3.1", "react-dropzone": "^14.2.3", "react-google-maps": "^9.4.5", "react-hook-form": "^7.50.1", "react-hot-toast": "^2.4.1", - "react-intl": "^6.6.2", + "react-intl": "^6.6.6", "react-places-autocomplete": "^7.3.0", "react-quill": "^2.0.0", - "react-redux": "^9.1.0", + "react-redux": "^9.1.2", "react-select": "^5.8.0", "react-share": "^5.0.3", - "sharp": "^0.33.2", - "siwe": "^2.1.4", - "styled-components": "^6.1.8", - "swiper": "^11.0.6", + "sharp": "^0.33.3", + "siwe": "^2.3.2", + "styled-components": "^6.1.11", + "swiper": "^11.1.3", "unsplash-js": "^7.0.19", - "viem": "^2.9.28", - "wagmi": "^2.6.0" + "viem": "^2.10.5", + "wagmi": "^2.8.7" }, "devDependencies": { "@babel/preset-typescript": "^7.23.3", @@ -87,19 +86,19 @@ "@types/lodash.isequal": "^4.5.8", "@types/node": "^20.11.20", "@types/nprogress": "^0.2.3", - "@types/react": "^18.2.58", + "@types/react": "^18.3.2", "@types/react-custom-scrollbars": "^4.0.13", "@types/react-datepicker": "^6.0.1", - "@types/react-dom": "^18.2.19", + "@types/react-dom": "^18.3.0", "@types/react-html-parser": "^2.0.6", "@types/react-modal": "^3.16.3", "@types/react-places-autocomplete": "^7.2.14", "@typescript-eslint/eslint-plugin": "^7.0.2", "@typescript-eslint/parser": "^7.0.2", "babel-plugin-styled-components": "^2.1.4", - "cypress": "^13.6.6", + "cypress": "^13.9.0", "eslint": "^8.57.0", - "eslint-config-next": "^14.1.0", + "eslint-config-next": "^14.2.3", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-jest": "^3.0.2", "eslint-import-resolver-typescript": "^3.6.1", diff --git a/pages/donate/[slug].tsx b/pages/donate/[slug].tsx index e0710e025e..fed026867a 100644 --- a/pages/donate/[slug].tsx +++ b/pages/donate/[slug].tsx @@ -6,7 +6,7 @@ import { captureException } from '@sentry/nextjs'; import { IDonationProject } from '@/apollo/types/types'; import { FETCH_GIVETH_PROJECT_BY_ID, - FETCH_PROJECT_BY_SLUG, + FETCH_PROJECT_BY_SLUG_DONATION, } from '@/apollo/gql/gqlProjects'; import { client } from '@/apollo/apolloClient'; import { ProjectMeta } from '@/components/Metatag'; @@ -47,7 +47,7 @@ export const getServerSideProps: GetServerSideProps = async props => { const { query } = props; const slug = decodeURI(query.slug as string).replace(/\s/g, ''); const { data } = await client.query({ - query: FETCH_PROJECT_BY_SLUG, + query: FETCH_PROJECT_BY_SLUG_DONATION, variables: { slug }, fetchPolicy: 'no-cache', }); diff --git a/pages/project/[projectIdSlug]/index.tsx b/pages/project/[projectIdSlug]/index.tsx index 2bae394c5b..3b701dd79f 100644 --- a/pages/project/[projectIdSlug]/index.tsx +++ b/pages/project/[projectIdSlug]/index.tsx @@ -1,6 +1,6 @@ import { FC } from 'react'; import { client } from '@/apollo/apolloClient'; -import { FETCH_PROJECT_BY_SLUG } from '@/apollo/gql/gqlProjects'; +import { FETCH_PROJECT_BY_SLUG_SINGLE_PROJECT } from '@/apollo/gql/gqlProjects'; import { useReferral } from '@/hooks/useReferral'; import ProjectIndex from '@/components/views/project/ProjectIndex'; @@ -25,7 +25,7 @@ export async function getServerSideProps(props: { const slug = decodeURI(query.projectIdSlug).replace(/\s/g, ''); const { data } = await client.query({ - query: FETCH_PROJECT_BY_SLUG, + query: FETCH_PROJECT_BY_SLUG_SINGLE_PROJECT, variables: { slug }, fetchPolicy: 'no-cache', }); diff --git a/pages/qf-archive/[slug].tsx b/pages/qf-archive/[slug].tsx index 60edda6f56..0ce7394a28 100644 --- a/pages/qf-archive/[slug].tsx +++ b/pages/qf-archive/[slug].tsx @@ -1,5 +1,5 @@ import { GetServerSideProps } from 'next/types'; -import { IMainCategory } from '@/apollo/types/types'; +import { IMainCategory, IQFRound } from '@/apollo/types/types'; import { transformGraphQLErrorsToStatusCode } from '@/helpers/requests'; import { initializeApollo } from '@/apollo/apolloClient'; import { OPTIONS_HOME_PROJECTS } from '@/apollo/gql/gqlOptions'; @@ -35,7 +35,7 @@ const QFProjectsCategoriesRoute = (props: IProjectsCategoriesRouteProps) => { @@ -46,9 +46,10 @@ const QFProjectsCategoriesRoute = (props: IProjectsCategoriesRouteProps) => { }; export const getServerSideProps: GetServerSideProps = async context => { - const apolloClient = initializeApollo(); const { variables, notifyOnNetworkStatusChange } = OPTIONS_HOME_PROJECTS; try { + const apolloClient = initializeApollo(); + const { query } = context; const slug = query.slug; if (!slug) @@ -58,6 +59,7 @@ export const getServerSideProps: GetServerSideProps = async context => { permanent: false, }, }; + const { data: { mainCategories }, }: { @@ -68,46 +70,50 @@ export const getServerSideProps: GetServerSideProps = async context => { }); const updatedMainCategory = [allCategoriesItem, ...mainCategories]; - const selectedMainCategory = updatedMainCategory[0]; - if (selectedMainCategory) { - const updatedSelectedMainCategory = { - ...selectedMainCategory, - selected: true, - }; - const apolloClient = initializeApollo(); + const updatedSelectedMainCategory = { + ...allCategoriesItem, + selected: true, + }; - const { data } = await apolloClient.query({ - query: FETCH_ALL_PROJECTS, - variables: { - ...variables, - sortingBy: query.sort || EProjectsSortBy.INSTANT_BOOSTING, - campaignSlug: query.campaignSlug, - qfRoundSlug: slug, - notifyOnNetworkStatusChange, - }, - fetchPolicy: 'network-only', - }); - console.log('data', data); - const { projects, totalCount } = data.allProjects; - const { - data: { qfRounds }, - } = await apolloClient.query({ - query: FETCH_QF_ROUNDS, - fetchPolicy: 'network-only', - }); + const { data } = await apolloClient.query({ + query: FETCH_ALL_PROJECTS, + variables: { + ...variables, + sortingBy: query.sort || EProjectsSortBy.INSTANT_BOOSTING, + campaignSlug: query.campaignSlug, + qfRoundSlug: slug, + notifyOnNetworkStatusChange, + }, + fetchPolicy: 'network-only', + }); + + const { projects, totalCount } = data.allProjects; + const { + data: { qfRounds }, + } = await apolloClient.query({ + query: FETCH_QF_ROUNDS, + fetchPolicy: 'network-only', + }); + + const roundExists = (qfRounds as IQFRound[]).some( + round => round.slug === slug, + ); + + if (!roundExists) { return { - props: { - projects, - mainCategories: updatedMainCategory, - selectedMainCategory: updatedSelectedMainCategory, - totalCount, - qfRounds, - }, + notFound: true, }; } + return { - notFound: true, + props: { + projects, + mainCategories: updatedMainCategory, + selectedMainCategory: updatedSelectedMainCategory, + totalCount, + qfRounds, + }, }; } catch (error: any) { const statusCode = transformGraphQLErrorsToStatusCode( diff --git a/pages/qf-archive/index.tsx b/pages/qf-archive/index.tsx new file mode 100644 index 0000000000..278b1db202 --- /dev/null +++ b/pages/qf-archive/index.tsx @@ -0,0 +1,11 @@ +import { ArchivedQFRoundsView } from '@/components/views/archivedQFRounds/ArchivedQFRounds.view'; +import { ArchivedQFRoundsProvider } from '@/components/views/archivedQFRounds/archivedQfRounds.context'; + +const ArchivedQFPageRoute = () => { + return ( + + + + ); +}; +export default ArchivedQFPageRoute; diff --git a/pages/success/[slug].tsx b/pages/success/[slug].tsx index a0906eb3fd..1bfd2610b8 100644 --- a/pages/success/[slug].tsx +++ b/pages/success/[slug].tsx @@ -3,7 +3,7 @@ import Head from 'next/head'; import { captureException } from '@sentry/nextjs'; import { useRouter } from 'next/router'; import { client } from '@/apollo/apolloClient'; -import { FETCH_PROJECT_BY_SLUG } from '@/apollo/gql/gqlProjects'; +import { FETCH_PROJECT_BY_SLUG_SUCCESS } from '@/apollo/gql/gqlProjects'; import SuccessfulCreation from '@/components/SuccessfulCreation'; import { ProjectMeta } from '@/components/Metatag'; import { IProject } from '@/apollo/types/types'; @@ -19,7 +19,7 @@ const SuccessRoute = () => { setIsLoading(true); try { const { data } = await client.query({ - query: FETCH_PROJECT_BY_SLUG, + query: FETCH_PROJECT_BY_SLUG_SUCCESS, variables: { slug }, fetchPolicy: 'no-cache', }); diff --git a/pages/verification/[slug]/index.tsx b/pages/verification/[slug]/index.tsx index 9ed96084d1..4a409ebbf1 100644 --- a/pages/verification/[slug]/index.tsx +++ b/pages/verification/[slug]/index.tsx @@ -12,7 +12,7 @@ import UserNotSignedIn from '@/components/UserNotSignedIn'; import { compareAddresses, isUserRegistered } from '@/lib/helpers'; import CompleteProfile from '@/components/CompleteProfile'; import { client } from '@/apollo/apolloClient'; -import { FETCH_PROJECT_BY_SLUG } from '@/apollo/gql/gqlProjects'; +import { FETCH_PROJECT_BY_SLUG_VERIFICATION } from '@/apollo/gql/gqlProjects'; import { IProject } from '@/apollo/types/types'; import { EProjectStatus } from '@/apollo/types/gqlEnums'; import NotAvailableHandler from '@/components/NotAvailableHandler'; @@ -38,14 +38,14 @@ const VerificationRoute = () => { }, []); useEffect(() => { - if (!slug) return; + if (!slug || !userData?.id) return; setIsProjectLoading(true); setAllowVerification(false); setOwnerAddress(undefined); setIsCancelled(false); client .query({ - query: FETCH_PROJECT_BY_SLUG, + query: FETCH_PROJECT_BY_SLUG_VERIFICATION, variables: { slug, connectedWalletUserId: Number(userData?.id), diff --git a/public/assets/Giveth_Report_QF_2024.this.one.pdf b/public/assets/Giveth_Report_QF_2024.this.one.pdf index 69f90e7fa7..de3912d7b3 100644 Binary files a/public/assets/Giveth_Report_QF_2024.this.one.pdf and b/public/assets/Giveth_Report_QF_2024.this.one.pdf differ diff --git a/public/images/arcs/arc1.svg b/public/images/arcs/arc1.svg new file mode 100644 index 0000000000..fb330e3d09 --- /dev/null +++ b/public/images/arcs/arc1.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/banners/qf-banner.svg b/public/images/banners/qf-banner.svg new file mode 100644 index 0000000000..f0fba1f9b9 --- /dev/null +++ b/public/images/banners/qf-banner.svg @@ -0,0 +1,1821 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/apollo/gql/gqlProjects.ts b/src/apollo/gql/gqlProjects.ts index ce9356097c..bd60b74eeb 100644 --- a/src/apollo/gql/gqlProjects.ts +++ b/src/apollo/gql/gqlProjects.ts @@ -1,5 +1,4 @@ import { gql } from '@apollo/client'; -import { isRecurringActive } from '@/configuration'; export const PROJECT_CORE_FIELDS = gql` fragment ProjectCoreFields on Project { @@ -17,85 +16,52 @@ export const PROJECT_CORE_FIELDS = gql` beginDate endDate maximumReward + allocatedTokenSymbol + allocatedFundUSDPreferred + allocatedFundUSD } } `; -export const PROJECT_CARD_FIELDS = isRecurringActive - ? gql` - ${PROJECT_CORE_FIELDS} - fragment ProjectCardFields on Project { - ...ProjectCoreFields - descriptionSummary - totalReactions - reaction { - id - userId - } - adminUser { - name - walletAddress - avatar - } - updatedAt - organization { - label - } - projectPower { - powerRank - totalPower - round - } - sumDonationValueUsdForActiveQfRound - sumDonationValueUsd - countUniqueDonorsForActiveQfRound - countUniqueDonors - estimatedMatching { - projectDonationsSqrtRootSum - allProjectsSum - matchingPool - } - anchorContracts { - address - isActive - } - } - ` - : gql` - ${PROJECT_CORE_FIELDS} - fragment ProjectCardFields on Project { - ...ProjectCoreFields - descriptionSummary - totalReactions - reaction { - id - userId - } - adminUser { - name - walletAddress - avatar - } - updatedAt - organization { - label - } - projectPower { - powerRank - totalPower - round - } - sumDonationValueUsdForActiveQfRound - sumDonationValueUsd - countUniqueDonorsForActiveQfRound - countUniqueDonors - estimatedMatching { - projectDonationsSqrtRootSum - allProjectsSum - matchingPool - } - } - `; +export const PROJECT_CARD_FIELDS = gql` + ${PROJECT_CORE_FIELDS} + fragment ProjectCardFields on Project { + ...ProjectCoreFields + descriptionSummary + totalReactions + reaction { + id + userId + } + adminUser { + name + walletAddress + avatar + } + updatedAt + organization { + label + } + projectPower { + powerRank + totalPower + round + } + sumDonationValueUsdForActiveQfRound + sumDonationValueUsd + countUniqueDonorsForActiveQfRound + countUniqueDonors + estimatedMatching { + projectDonationsSqrtRootSum + allProjectsSum + matchingPool + } + anchorContracts { + address + isActive + } + } +`; export const FETCH_ALL_PROJECTS = gql` ${PROJECT_CARD_FIELDS} @@ -131,296 +97,238 @@ export const FETCH_ALL_PROJECTS = gql` } `; -export const FETCH_PROJECT_BY_SLUG = isRecurringActive - ? gql` - query ProjectBySlug($slug: String!, $connectedWalletUserId: Int) { - projectBySlug( - slug: $slug - connectedWalletUserId: $connectedWalletUserId - ) { - __typename - id - title - image - slug - verified - totalDonations - description - descriptionSummary - addresses { - address - isRecipient - networkId - chainType - } - socialMedia { - type - link - } - totalProjectUpdates - creationDate - reaction { - id - userId - } - totalReactions - categories { - name - value - mainCategory { - title - } - } - adminUser { - id - name - walletAddress - avatar - } - listed - status { - id - name - } - organization { - name - label - supportCustomTokens - } - projectVerificationForm { - status - } - verificationFormStatus - projectPower { - powerRank - totalPower - round - } - projectFuturePower { - totalPower - powerRank - round - } - givbackFactor - sumDonationValueUsdForActiveQfRound - sumDonationValueUsd - countUniqueDonorsForActiveQfRound - countUniqueDonors - estimatedMatching { - projectDonationsSqrtRootSum - allProjectsSum - matchingPool - } - qfRounds { - id - name - isActive - beginDate - endDate - eligibleNetworks - maximumReward - } - campaigns { - id - title - # description - # type - # photo - # video - # videoPreview - # slug - # isActive - # order - # landingLink - # filterFields - # sortingField - # createdAt - # updatedAt - } - anchorContracts { - address - isActive - } - } +export const FETCH_PROJECT_BY_SLUG_VERIFICATION = gql` + query ProjectBySlug($slug: String!, $connectedWalletUserId: Int) { + projectBySlug( + slug: $slug + connectedWalletUserId: $connectedWalletUserId + ) { + id + status { + name } - ` - : gql` - query ProjectBySlug($slug: String!, $connectedWalletUserId: Int) { - projectBySlug( - slug: $slug - connectedWalletUserId: $connectedWalletUserId - ) { - __typename - id - title - image - slug - verified - totalDonations - description - addresses { - address - isRecipient - networkId - chainType - } - socialMedia { - type - link - } - totalProjectUpdates - creationDate - reaction { - id - userId - } - totalReactions - categories { - name - value - mainCategory { - title - } - } - adminUser { - id - name - walletAddress - avatar - } - listed - status { - id - name - } - organization { - name - label - supportCustomTokens - } - projectVerificationForm { - status - } - verificationFormStatus - projectPower { - powerRank - totalPower - round - } - projectFuturePower { - totalPower - powerRank - round - } - givbackFactor - sumDonationValueUsdForActiveQfRound - sumDonationValueUsd - countUniqueDonorsForActiveQfRound - countUniqueDonors - estimatedMatching { - projectDonationsSqrtRootSum - allProjectsSum - matchingPool - } - qfRounds { - id - name - isActive - beginDate - endDate - eligibleNetworks - maximumReward - } - campaigns { - id - title - # description - # type - # photo - # video - # videoPreview - # slug - # isActive - # order - # landingLink - # filterFields - # sortingField - # createdAt - # updatedAt - } - } + adminUser { + walletAddress } - `; + } + } +`; -export const FETCH_PROJECT_BY_ID = isRecurringActive - ? gql` - query ProjectById($id: Float!) { - projectById(id: $id) { - id - title - image - description - addresses { - address - isRecipient - networkId - chainType - } - socialMedia { - type - link - } - impactLocation - categories { - name - value - } - adminUser { - walletAddress - } - status { - name - } - slug - anchorContracts { - address - isActive - } - } +export const FETCH_PROJECT_BY_SLUG_SUCCESS = gql` + query ProjectBySlug($slug: String!, $connectedWalletUserId: Int) { + projectBySlug( + slug: $slug + connectedWalletUserId: $connectedWalletUserId + ) { + id + title + image + slug + descriptionSummary + adminUser { + id + name + walletAddress + avatar } - ` - : gql` - query ProjectById($id: Float!) { - projectById(id: $id) { - id + } + } +`; + +export const FETCH_PROJECT_BY_SLUG_DONATION = gql` + query ProjectBySlug($slug: String!, $connectedWalletUserId: Int) { + projectBySlug( + slug: $slug + connectedWalletUserId: $connectedWalletUserId + ) { + id + title + image + slug + descriptionSummary + verified + sumDonationValueUsd + sumDonationValueUsdForActiveQfRound + countUniqueDonorsForActiveQfRound + adminUser { + id + name + walletAddress + avatar + } + organization { + label + supportCustomTokens + } + addresses { + address + isRecipient + networkId + chainType + } + status { + name + } + estimatedMatching { + projectDonationsSqrtRootSum + allProjectsSum + matchingPool + } + qfRounds { + id + name + isActive + beginDate + endDate + eligibleNetworks + maximumReward + allocatedTokenSymbol + allocatedFundUSDPreferred + allocatedFundUSD + } + anchorContracts { + address + isActive + } + } + } +`; + +export const FETCH_PROJECT_BY_SLUG_SINGLE_PROJECT = gql` + query ProjectBySlug($slug: String!, $connectedWalletUserId: Int) { + projectBySlug( + slug: $slug + connectedWalletUserId: $connectedWalletUserId + ) { + __typename + id + title + image + slug + verified + totalDonations + description + addresses { + address + isRecipient + networkId + chainType + } + socialMedia { + type + link + } + totalProjectUpdates + creationDate + reaction { + id + userId + } + totalReactions + categories { + name + value + mainCategory { title - image - description - addresses { - address - isRecipient - networkId - chainType - } - socialMedia { - type - link - } - impactLocation - categories { - name - value - } - adminUser { - walletAddress - } - status { - name - } - slug } } - `; + adminUser { + id + name + walletAddress + avatar + } + listed + status { + id + name + } + organization { + name + label + supportCustomTokens + } + verificationFormStatus + projectPower { + powerRank + totalPower + round + } + projectFuturePower { + totalPower + powerRank + round + } + givbackFactor + sumDonationValueUsdForActiveQfRound + sumDonationValueUsd + countUniqueDonorsForActiveQfRound + countUniqueDonors + estimatedMatching { + projectDonationsSqrtRootSum + allProjectsSum + matchingPool + } + qfRounds { + id + name + isActive + beginDate + endDate + eligibleNetworks + maximumReward + allocatedTokenSymbol + allocatedFundUSDPreferred + allocatedFundUSD + } + campaigns { + id + title + } + anchorContracts { + address + isActive + } + } + } +`; + +export const FETCH_PROJECT_BY_ID = gql` + query ProjectById($id: Float!) { + projectById(id: $id) { + id + title + image + description + addresses { + address + isRecipient + networkId + chainType + } + socialMedia { + type + link + } + impactLocation + categories { + name + value + } + adminUser { + walletAddress + } + status { + name + } + slug + anchorContracts { + address + isActive + } + } + } +`; export const FETCH_GIVETH_PROJECT_BY_ID = gql` query ProjectById($id: Float!) { @@ -592,7 +500,7 @@ export const CREATE_PROJECT = gql` id title description - admin + adminUserId adminUser { name walletAddress @@ -627,7 +535,7 @@ export const UPDATE_PROJECT = gql` image slug creationDate - admin + adminUserId adminUser { name walletAddress @@ -675,7 +583,7 @@ export const ADD_RECIPIENT_ADDRESS_TO_PROJECT = gql` verified slugHistory creationDate - admin + adminUserId walletAddress impactLocation categories { diff --git a/src/apollo/gql/gqlQF.ts b/src/apollo/gql/gqlQF.ts index ca023c574a..8662e9b751 100644 --- a/src/apollo/gql/gqlQF.ts +++ b/src/apollo/gql/gqlQF.ts @@ -10,6 +10,14 @@ export const FETCH_QF_ROUNDS_QUERY = ` beginDate endDate minimumPassportScore + title + description + bannerBgImage + sponsorsImgs + allocatedFund + allocatedFundUSD + allocatedFundUSDPreferred + allocatedTokenSymbol } } `; @@ -34,6 +42,35 @@ export const FETCH_QF_ROUND_STATS = gql` uniqueDonors allDonationsUsdValue matchingPool + qfRound { + allocatedFund + allocatedFundUSD + allocatedFundUSDPreferred + allocatedTokenSymbol + } + } + } +`; + +export const FETCH_ARCHIVED_QF_ROUNDS = gql` + query fetchQFArchivedRounds( + $limit: Int + $skip: Int + $orderBy: QfArchivedRoundsOrderBy + ) { + qfArchivedRounds(limit: $limit, skip: $skip, orderBy: $orderBy) { + id + name + slug + isActive + allocatedFund + allocatedFundUSD + allocatedTokenSymbol + eligibleNetworks + beginDate + endDate + totalDonations + uniqueDonors } } `; diff --git a/src/apollo/gql/gqlUser.ts b/src/apollo/gql/gqlUser.ts index 4e3215af09..c87d83ce0c 100644 --- a/src/apollo/gql/gqlUser.ts +++ b/src/apollo/gql/gqlUser.ts @@ -175,6 +175,7 @@ export const UPDATE_USER = gql` $lastName: String $firstName: String $avatar: String + $newUser: Boolean ) { updateUser( url: $url @@ -183,6 +184,7 @@ export const UPDATE_USER = gql` firstName: $firstName lastName: $lastName avatar: $avatar + newUser: $newUser ) } `; diff --git a/src/apollo/types/gqlEnums.ts b/src/apollo/types/gqlEnums.ts index b86854017a..6498054d42 100644 --- a/src/apollo/types/gqlEnums.ts +++ b/src/apollo/types/gqlEnums.ts @@ -23,6 +23,13 @@ export enum EProjectsSortBy { EstimatedMatching = 'EstimatedMatching', } +export enum EQFRoundsSortBy { + MATCHING_POOL = 'MatchingPool', + UNIQUE_DONORS = 'UniqueDonors', + NEWEST = 'Newest', + OLDEST = 'Oldest', +} + export enum EProjectStatus { DRAFT = 'drafted', ACTIVE = 'activate', diff --git a/src/apollo/types/types.ts b/src/apollo/types/types.ts index 0be1fe73a7..c56aea5271 100644 --- a/src/apollo/types/types.ts +++ b/src/apollo/types/types.ts @@ -41,7 +41,7 @@ export interface IProject { image?: string; slug: string; creationDate?: string; - admin?: string; + adminUserId?: number; description?: string; descriptionSummary?: string; addresses?: IWalletAddress[]; @@ -57,7 +57,6 @@ export interface IProject { donations: { id?: string; }[]; - users: IUser[]; totalDonations?: number; totalProjectUpdates?: number; status: { @@ -187,6 +186,7 @@ export enum EProjectSocialMediaType { FARCASTER = 'FARCASTER', LENS = 'LENS', WEBSITE = 'WEBSITE', + TELEGRAM = 'TELEGRAM', } export interface IProjectSocialMedia { @@ -466,6 +466,20 @@ export interface IQFRound { minimumPassportScore: number; eligibleNetworks: number[]; maximumReward: number; + title: string; + description: string; + bannerBgImage: string; + sponsorsImgs: string[]; + allocatedFund: number; + allocatedFundUSD: number; + allocatedFundUSDPreferred: boolean; + allocatedTokenSymbol: string; + allocatedTokenChainId: number; +} + +export interface IArchivedQFRound extends IQFRound { + totalDonations: number; + uniqueDonors: number; } export interface IGetQfRoundHistory { diff --git a/src/components/BlogCard.tsx b/src/components/BlogCard.tsx index 3207bf919f..0be2a91d80 100644 --- a/src/components/BlogCard.tsx +++ b/src/components/BlogCard.tsx @@ -10,6 +10,7 @@ import { P, } from '@giveth/ui-design-system'; import { useIntl } from 'react-intl'; +import Image from 'next/image'; import ExternalLink from '@/components/ExternalLink'; import { htmlToText } from '@/lib/helpers'; @@ -39,7 +40,12 @@ const BlogCard: FC = props => {
- {title} + {title} {htmlToText(title)} @@ -91,9 +97,7 @@ const ImageWrapper = styled.div` height: 170px; width: 100%; overflow: hidden; - > img { - object-fit: cover; - } + position: relative; `; const Wrapper = styled(Flex)` diff --git a/src/components/FileUploader.tsx b/src/components/FileUploader.tsx index 69cf0699b7..4e5a8a2099 100644 --- a/src/components/FileUploader.tsx +++ b/src/components/FileUploader.tsx @@ -141,7 +141,12 @@ const FileUploader: FC = ({ files[0].status === EFileUploadingStatus.UPLOADED && files[0].type.includes('image') ? ( - uploaded image + uploaded image ) : ( @@ -269,9 +274,8 @@ const FileUploader: FC = ({ }; const ShowingImage = styled.div` - > img { - border-radius: 8px; - } + position: relative; + border-radius: 8px; `; const DropZone = styled.div` diff --git a/src/components/GIVeconomyPages/GIVbacks.sc.tsx b/src/components/GIVeconomyPages/GIVbacks.sc.tsx index 6b3ff5ea91..58369879f1 100644 --- a/src/components/GIVeconomyPages/GIVbacks.sc.tsx +++ b/src/components/GIVeconomyPages/GIVbacks.sc.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; +import Image from 'next/image'; import { H2, @@ -112,13 +113,15 @@ export const RoundButton = styled(ButtonLink)` export const InfoSection = styled.div``; -export const InfoImage = styled.img` - height: 103px; - width: 216px; +export const InfoImage = styled(Image)` margin: 0 auto; display: block; `; +export const ImageWrapper = styled.div` + position: relative; +`; + export const InfoTitle = styled(H5)` margin: 44px 0 16px; `; diff --git a/src/components/GIVeconomyPages/GIVbacks.tsx b/src/components/GIVeconomyPages/GIVbacks.tsx index b8ac0a2b7d..d64872f7ed 100644 --- a/src/components/GIVeconomyPages/GIVbacks.tsx +++ b/src/components/GIVeconomyPages/GIVbacks.tsx @@ -28,6 +28,7 @@ import { RoundButton, InfoSection, InfoImage, + ImageWrapper, InfoTitle, InfoDesc, GivAllocated, @@ -316,7 +317,15 @@ export const TabGIVbacksBottom = () => { - + + + {formatMessage({ id: 'label.when_you_giv_you_get_giv_back', diff --git a/src/components/Header/Header.sc.tsx b/src/components/Header/Header.sc.tsx index ccef504077..e92db8c612 100644 --- a/src/components/Header/Header.sc.tsx +++ b/src/components/Header/Header.sc.tsx @@ -1,4 +1,5 @@ import styled, { css } from 'styled-components'; +import Image from 'next/image'; import { neutralColors, brandColors, @@ -173,7 +174,7 @@ export const WBNetwork = styled(GLink)` overflow: hidden; `; -export const HBPic = styled.img` +export const HBPic = styled(Image)` border-radius: 24px; `; diff --git a/src/components/ImageUploader.tsx b/src/components/ImageUploader.tsx index 9c09851fd5..15ba6975d9 100644 --- a/src/components/ImageUploader.tsx +++ b/src/components/ImageUploader.tsx @@ -1,6 +1,7 @@ import { FC } from 'react'; import { useIntl } from 'react-intl'; import styled from 'styled-components'; +import Image from 'next/image'; import { brandColors, GLink, @@ -33,7 +34,12 @@ const ImageUploader: FC = props => { <> {url ? ( - uploaded image + uploaded image ) : ( @@ -99,9 +105,8 @@ const ImageUploader: FC = props => { }; const ShowingImage = styled.div` - > img { - border-radius: 8px; - } + position: relative; + border-radius: 8px; `; const DropZone = styled(FlexCenter)` diff --git a/src/components/SocialBox.tsx b/src/components/SocialBox.tsx index 2eb2dfd267..3cc48ba2f3 100644 --- a/src/components/SocialBox.tsx +++ b/src/components/SocialBox.tsx @@ -25,7 +25,7 @@ interface ISocialBox { const SocialBox: FC = props => { const { project, contentType, isDonateFooter } = props; - const { description, slug } = project; + const { descriptionSummary, slug } = project; const { formatMessage } = useIntl(); const shareTitleTwitter = shareContentCreator( @@ -59,7 +59,7 @@ const SocialBox: FC = props => { { return ( - - + + + @@ -110,7 +130,7 @@ const GiverH4 = styled(H2)` font-weight: 700; margin-bottom: 24px; `; -const BGImg = styled.img` +const BGImg = styled(Image)` position: absolute; `; const Wrapper = styled.div` @@ -119,14 +139,6 @@ const Wrapper = styled.div` const ContainerStyled = styled(Container)` text-align: center; padding-top: 114px; - > img:first-child { - top: 0; - right: 20px; - } - > img:nth-child(2) { - bottom: 0; - left: 20px; - } `; const Left = styled(Col)` z-index: 1; diff --git a/src/components/TeamCard.tsx b/src/components/TeamCard.tsx index a2b0487669..01f630322c 100644 --- a/src/components/TeamCard.tsx +++ b/src/components/TeamCard.tsx @@ -23,7 +23,7 @@ const TeamCard = (props: { member: IMember }) => { - {name} + {name} {name} {title} @@ -62,6 +62,7 @@ const ImageContainer = styled.div` width: 180px; height: 180px; overflow: hidden; + position: relative; border-radius: 50%; margin: -140px auto 0 auto; `; diff --git a/src/components/cards/StakingCards/BaseStakingCard/BaseStakingCard.sc.tsx b/src/components/cards/StakingCards/BaseStakingCard/BaseStakingCard.sc.tsx index e0c0577d35..6d63b64914 100644 --- a/src/components/cards/StakingCards/BaseStakingCard/BaseStakingCard.sc.tsx +++ b/src/components/cards/StakingCards/BaseStakingCard/BaseStakingCard.sc.tsx @@ -95,17 +95,6 @@ export const CardDisable = styled.div` background-color: #ffffffa0; `; -export const Return = styled.img` - background: transparent; - width: 50px; - height: 50px; - position: absolute; - cursor: pointer; - top: 0; - right: 0; - padding: 16px; -`; - export const OutOfRangeBadgeContianer = styled(Flex)` padding: 3px 7px; background-color: ${brandColors.giv[500]}; @@ -129,12 +118,6 @@ export const IconHelpFilledWrapper = styled.div` cursor: pointer; `; -export const IconGift = styled.img` - cursor: pointer; - width: 20px; - height: 20px; -`; - export const GiftTooltip = styled.div` color: ${neutralColors.gray[100]}; text-align: center; diff --git a/src/components/cards/StakingCards/BaseStakingCard/BaseStakingCard.tsx b/src/components/cards/StakingCards/BaseStakingCard/BaseStakingCard.tsx index beadd8b188..cd6dfc5e72 100644 --- a/src/components/cards/StakingCards/BaseStakingCard/BaseStakingCard.tsx +++ b/src/components/cards/StakingCards/BaseStakingCard/BaseStakingCard.tsx @@ -19,7 +19,6 @@ import { StakingCardHeader } from './StakingCardHeader'; import { getNowUnixMS } from '@/helpers/time'; import { StakingPoolInfoAndActions } from './StakingPoolInfoAndActions'; import { ArchiveAndNetworkCover } from '@/components/ArchiveAndNetworkCover/ArchiveAndNetworkCover'; -import type { LiquidityPosition } from '@/types/nfts'; export enum StakeCardState { NORMAL, @@ -30,8 +29,6 @@ export enum StakeCardState { interface IBaseStakingCardProps { poolStakingConfig: PoolStakingConfig | RegenPoolStakingConfig; notif?: ReactNode; - stakedPositions?: LiquidityPosition[]; - unstakedPositions?: LiquidityPosition[]; currentIncentive?: { key?: (string | number)[] | null | undefined; }; @@ -40,8 +37,6 @@ interface IBaseStakingCardProps { const BaseStakingCard: FC = ({ poolStakingConfig, notif, - stakedPositions, - unstakedPositions, currentIncentive, }) => { const [state, setState] = useState(StakeCardState.NORMAL); @@ -91,8 +86,6 @@ const BaseStakingCard: FC = ({ poolStakingConfig={poolStakingConfig} isDiscontinued={isDiscontinued} isGIVpower={isGIVpower} - stakedPositions={stakedPositions} - unstakedPositions={unstakedPositions} currentIncentive={currentIncentive} /> diff --git a/src/components/cards/StakingCards/BaseStakingCard/StakingPoolInfoAndActions.tsx b/src/components/cards/StakingCards/BaseStakingCard/StakingPoolInfoAndActions.tsx index 54db9f24a7..1c1d56a0eb 100644 --- a/src/components/cards/StakingCards/BaseStakingCard/StakingPoolInfoAndActions.tsx +++ b/src/components/cards/StakingCards/BaseStakingCard/StakingPoolInfoAndActions.tsx @@ -50,7 +50,6 @@ import config from '@/configuration'; import Routes from '@/lib/constants/Routes'; import { UnStakeModal } from '@/components/modals/Unstake/UnStake'; import { HarvestAllModal } from '@/components/modals/HarvestAll'; -import { LiquidityPosition } from '@/types/nfts'; import LockModal from '@/components/modals/StakeLock/Lock'; import { WhatIsStreamModal } from '@/components/modals/WhatIsStream'; import { LockupDetailsModal } from '@/components/modals/LockupDetailsModal'; @@ -60,8 +59,6 @@ interface IStakingPoolInfoAndActionsProps { poolStakingConfig: PoolStakingConfig | RegenPoolStakingConfig; isDiscontinued: boolean; isGIVpower: boolean; - stakedPositions?: LiquidityPosition[]; - unstakedPositions?: LiquidityPosition[]; currentIncentive?: { key?: (string | number)[] | null | undefined; }; @@ -71,8 +68,6 @@ export const StakingPoolInfoAndActions: FC = ({ poolStakingConfig, isDiscontinued, isGIVpower, - stakedPositions, - unstakedPositions, currentIncentive, }) => { const [started, setStarted] = useState(true); @@ -502,7 +497,6 @@ export const StakingPoolInfoAndActions: FC = ({ setShowModal={setShowHarvestModal} poolStakingConfig={poolStakingConfig} regenStreamConfig={regenStreamConfig} - stakedPositions={stakedPositions} currentIncentive={currentIncentive} /> )} diff --git a/src/components/cards/StakingCards/PositionCard/PositionCard.tsx b/src/components/cards/StakingCards/PositionCard/PositionCard.tsx deleted file mode 100644 index 57e1caa179..0000000000 --- a/src/components/cards/StakingCards/PositionCard/PositionCard.tsx +++ /dev/null @@ -1,261 +0,0 @@ -import { FC } from 'react'; -import styled from 'styled-components'; -import Image from 'next/image'; -import { - IconExternalLink, - neutralColors, - brandColors, - Button, - Overline, - B, - semanticColors, - Subline, - Flex, -} from '@giveth/ui-design-system'; - -import { captureException } from '@sentry/nextjs'; -import { LiquidityPosition } from '@/types/nfts'; -import { IconWithTooltip } from '../../../IconWithToolTip'; -import { Pending } from '../../../modals/HarvestAll.sc'; -import { IconEthereum } from '../../../Icons/Eth'; -import { IconGIV } from '../../../Icons/GIV'; -interface IV3StakeCardProps { - position: LiquidityPosition; - isUnstaking?: boolean; - selectedPosition?: boolean; - isConfirming?: boolean; - handleAction: (tokenId: number) => void; -} - -const STARTS_WITH = 'data:application/json;base64,'; - -const V3StakingCard: FC = ({ - position, - isUnstaking, - selectedPosition, - isConfirming, - handleAction, -}) => { - const { pool, tickLower, tickUpper } = position._position || {}; - - const buttonLabel = isUnstaking ? 'UNSTAKE' : 'STAKE'; - - // Check price range - const below = - pool && typeof tickLower === 'number' - ? pool.tickCurrent < tickLower - : undefined; - const above = - pool && typeof tickUpper === 'number' - ? pool.tickCurrent >= tickUpper - : undefined; - const inRange: boolean = - typeof below === 'boolean' && typeof above === 'boolean' - ? !below && !above - : false; - - const parseUri = (tokenURI: string) => { - if (!tokenURI) return {}; - try { - return JSON.parse(atob(tokenURI.slice(STARTS_WITH.length))); - } catch (error) { - captureException(error, { - tags: { - section: 'parseUri', - }, - }); - return {}; - } - }; - - const { image } = parseUri(position.uri); - - return ( - - {image && ( - - Liquidity Position NFT - - )} - - - LIQUIDITY - - {position._position - ? position._position?.pool.fee / 10000 - : '-'} - % - - - {inRange ? ( - <> - In Range - - ) : ( - - - Out of Range - - } - direction={'top'} - > - - Your staked position is out of range and is - not earning rewards.{' '} - - View position - {' '} - for more details. - - - )} - - - - - - {position._position - ? position._position.amount0.toSignificant(4) - : '-'} - - - - - - {position._position - ? position._position.amount1.toSignificant(4) - : '-'} - - - - - handleAction(position.tokenId)} - /> - - window.open( - `https://app.uniswap.org/#/pool/${position.tokenId.toString()}`, - ) - } - buttonType='texty' - icon={ - - } - /> - - - ); -}; - -export const ImageContainer = styled.div` - position: absolute; - bottom: 16px; -`; - -export const PositionContainer = styled.div` - position: relative; - display: flex; - justify-content: space-between; - border-radius: 8px; - padding: 12px 24px; - background: ${brandColors.giv[400]}; - color: ${neutralColors.gray[100]}; -`; - -export const PositionInfo = styled.div` - margin-left: 96px; - display: flex; - flex-direction: column; - gap: 12px; - color: ${neutralColors.gray[100]}; -`; - -export const PositionInfoRow = styled(Flex)` - font-size: 12px; - align-items: center; - gap: 8px; -`; - -export const TokenAmountRow = styled(Flex)` - align-items: center; - gap: 4px; -`; - -export const StyledOverline = styled(Overline)` - color: ${brandColors.deep[100]}; -`; - -const RoundedInfo = styled.div` - background: ${brandColors.giv[600]}; - border-radius: 28px; - font-weight: bold; - padding: 4px 10px; -`; - -export const TokenValue = styled(B)``; - -export const PositionActions = styled.div` - display: flex; - width: 200px; - flex-direction: column; - gap: 12px; -`; - -export const FullWidthButton = styled(Button)` - width: 100%; -`; - -export const SimpleDot = styled.div` - display: inline-block; - border-radius: 50%; - height: 8px; - width: 8px; - margin-right: 4px; -`; - -export const GreenDot = styled(SimpleDot)` - background-color: ${semanticColors.jade[500]}; -`; - -export const YellowDot = styled(SimpleDot)` - background-color: ${semanticColors.golden[500]}; -`; - -export const RangeTooltip = styled(Subline)` - color: ${neutralColors.gray[100]}; - width: 280px; -`; - -export const PositionLink = styled.a` - color: ${brandColors.cyan[500]}; -`; - -const PendingStyled = styled(Pending)` - margin: 0 auto; - max-width: 200px; -`; - -export default V3StakingCard; diff --git a/src/components/cards/StakingCards/PositionCard/StakingPositionCard.tsx b/src/components/cards/StakingCards/PositionCard/StakingPositionCard.tsx deleted file mode 100644 index b717894ee3..0000000000 --- a/src/components/cards/StakingCards/PositionCard/StakingPositionCard.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { FC, useState, useEffect } from 'react'; -import { SublineBold } from '@giveth/ui-design-system'; -import { PoolStakingConfig } from '@/types/config'; -import { useStakingNFT } from '@/hooks/useStakingNFT'; -import { useLiquidityPositions } from '@/hooks/useLiquidityPositions'; -import { IconWithTooltip } from '@/components/IconWithToolTip'; -import { YellowDot } from './PositionCard'; -import BaseStakingCard from '../BaseStakingCard/BaseStakingCard'; -import { - OutOfRangeBadgeContianer, - OutOfRangeTooltip, -} from '../BaseStakingCard/BaseStakingCard.sc'; - -const OutOfRangeBadge = () => ( - - - Out of Range - -); - -interface IStakingPositionCardProps { - poolStakingConfig: PoolStakingConfig; -} - -const StakingPositionCard: FC = ({ - poolStakingConfig, -}) => { - const { apr, unstakedPositions, stakedPositions, currentIncentive } = - useLiquidityPositions(); - const { rewardBalance } = useStakingNFT(stakedPositions); - const [oneOfPositionsOutOfRange, setOneOfPositionsOutOfRange] = - useState(false); - - useEffect(() => { - const _oneOfPositionsOutOfRange = stakedPositions.some( - stakedPosition => { - const { pool, tickLower, tickUpper } = - stakedPosition._position || {}; - // Check price range - const below = - pool && typeof tickLower === 'number' - ? pool.tickCurrent < tickLower - : undefined; - const above = - pool && typeof tickUpper === 'number' - ? pool.tickCurrent >= tickUpper - : undefined; - return below || above; - }, - ); - setOneOfPositionsOutOfRange(_oneOfPositionsOutOfRange); - }, [stakedPositions]); - - return ( - } - direction={'top'} - > - - One or more of your position(s) are out of range and - not earning rewards. Please unstake and make a new - position. - - - ) - } - /> - ); -}; - -export default StakingPositionCard; diff --git a/src/components/menu/FilterMenu.tsx b/src/components/menu/FilterMenu.tsx index 2619a0b0cf..8056168b4f 100644 --- a/src/components/menu/FilterMenu.tsx +++ b/src/components/menu/FilterMenu.tsx @@ -14,7 +14,6 @@ import { mediaQueries, zIndex } from '@/lib/constants/constants'; import CheckBox from '../Checkbox'; import { useProjectsContext } from '@/context/projects.context'; import { EProjectsFilter } from '@/apollo/types/types'; -import config from '@/configuration'; import { PinkyColoredNumber } from '../styled-components/PinkyColoredNumber'; interface IFilterMenuProps { @@ -60,12 +59,10 @@ const fundsFilter = [ }, ]; -if (config.ENABLE_SOLANA) { - fundsFilter.push({ - label: 'Solana', - value: EProjectsFilter.ACCEPT_FUND_ON_SOLANA, - }); -} +fundsFilter.push({ + label: 'Solana', + value: EProjectsFilter.ACCEPT_FUND_ON_SOLANA, +}); export const FilterMenu = forwardRef( ({ handleClose, isOpen }, ref) => { diff --git a/src/components/menu/UserButtonWithMenu.tsx b/src/components/menu/UserButtonWithMenu.tsx index e42f929376..5c4ce79479 100644 --- a/src/components/menu/UserButtonWithMenu.tsx +++ b/src/components/menu/UserButtonWithMenu.tsx @@ -130,8 +130,8 @@ const HeaderUserButton = ({}) => { diff --git a/src/components/modals/HarvestAll.tsx b/src/components/modals/HarvestAll.tsx index 240bfbb1e2..e55b39097b 100644 --- a/src/components/modals/HarvestAll.tsx +++ b/src/components/modals/HarvestAll.tsx @@ -25,7 +25,6 @@ import { Modal } from './Modal'; import { PoolStakingConfig, RegenStreamConfig } from '@/types/config'; import { formatWeiHelper } from '@/helpers/number'; import { harvestTokens } from '@/lib/stakingPool'; -import { claimUnstakeStake } from '@/lib/stakingNFT'; import { waitForTransaction } from '@/lib/transaction'; import { ConfirmedInnerModal, @@ -61,7 +60,6 @@ import { IconWithTooltip } from '../IconWithToolTip'; import { AmountBoxWithPrice } from '@/components/AmountBoxWithPrice'; import { IModal } from '@/types/common'; import { useAppSelector } from '@/features/hooks'; -import { LiquidityPosition } from '@/types/nfts'; import { useIsSafeEnvironment } from '@/hooks/useSafeAutoConnect'; import { useModalAnimation } from '@/hooks/useModalAnimation'; import { getPoolIconWithName } from '@/helpers/platform'; @@ -73,7 +71,6 @@ interface IHarvestAllInnerModalProps { title: string; poolStakingConfig?: PoolStakingConfig; regenStreamConfig?: RegenStreamConfig; - stakedPositions?: LiquidityPosition[]; currentIncentive?: { key?: (string | number)[] | null | undefined; }; @@ -94,7 +91,6 @@ export const HarvestAllModal: FC = ({ setShowModal, poolStakingConfig, regenStreamConfig, - stakedPositions, currentIncentive, }) => { const [state, setState] = useState(HarvestStates.HARVEST); @@ -208,54 +204,24 @@ export const HarvestAllModal: FC = ({ try { if (!chainId) return; if (poolStakingConfig) { - if ( - poolStakingConfig.hasOwnProperty( - 'NFT_POSITIONS_MANAGER_ADDRESS', - ) - ) { - if (!currentIncentive || !stakedPositions) return; - //NFT Harvest - const txResponse = await claimUnstakeStake( - address, - chainId, - currentIncentive, - stakedPositions, - ); - if (txResponse) { - const { status } = await waitForTransaction( - txResponse, - isSafeEnv, - ); - setState( - status - ? HarvestStates.CONFIRMED - : HarvestStates.ERROR, - ); - } else { - setState(HarvestStates.HARVEST); - } - } else { - // LP Harvest - const txResponse = await harvestTokens( - poolStakingConfig.LM_ADDRESS, - chainId, + // LP Harvest + const txResponse = await harvestTokens( + poolStakingConfig.LM_ADDRESS, + chainId, + ); + if (txResponse) { + setState(HarvestStates.SUBMITTED); + setTxHash(txResponse); + const { status } = await waitForTransaction( + txResponse, + isSafeEnv, ); - if (txResponse) { - setState(HarvestStates.SUBMITTED); - setTxHash(txResponse); - const { status } = await waitForTransaction( - txResponse, - isSafeEnv, - ); - setState( - status - ? HarvestStates.CONFIRMED - : HarvestStates.ERROR, - ); - } else { - setState(HarvestStates.HARVEST); - } + setState( + status ? HarvestStates.CONFIRMED : HarvestStates.ERROR, + ); + } else { + setState(HarvestStates.HARVEST); } } else { const txResponse = await claimReward( diff --git a/src/components/modals/V3Stake.tsx b/src/components/modals/V3Stake.tsx deleted file mode 100644 index 0fac7d0669..0000000000 --- a/src/components/modals/V3Stake.tsx +++ /dev/null @@ -1,311 +0,0 @@ -import { FC, useState } from 'react'; -import { - B, - brandColors, - Button, - H4, - neutralColors, - Overline, - Flex, -} from '@giveth/ui-design-system'; -import styled from 'styled-components'; -import { captureException } from '@sentry/nextjs'; -import { useAccount } from 'wagmi'; -import { Modal } from './Modal'; -import { CancelButton, HarvestButton, HelpRow } from './HarvestAll.sc'; -import { PoolStakingConfig } from '@/types/config'; -import { StakingPoolImages } from '../StakingPoolImages'; -import V3StakingCard from '../cards/StakingCards/PositionCard/PositionCard'; -import { exit, getReward, transfer } from '@/lib/stakingNFT'; -import { - ConfirmedInnerModal, - ErrorInnerModal, - SubmittedInnerModal, -} from './ConfirmSubmit'; -import useGIVTokenDistroHelper from '@/hooks/useGIVTokenDistroHelper'; -import { StakeState } from '@/lib/staking'; -import { IModal } from '@/types/common'; -import { useAppSelector } from '@/features/hooks'; -import { LiquidityPosition } from '@/types/nfts'; -import { useIsSafeEnvironment } from '@/hooks/useSafeAutoConnect'; -import { useModalAnimation } from '@/hooks/useModalAnimation'; -import { SubgraphDataHelper } from '@/lib/subgraph/subgraphDataHelper'; -import { waitForTransaction } from '@/lib/transaction'; - -interface IV3StakeModalProps extends IModal { - poolStakingConfig: PoolStakingConfig; - isUnstakingModal?: boolean; - stakedPositions: LiquidityPosition[]; - unstakedPositions: LiquidityPosition[]; - currentIncentive: { - key?: (string | number)[] | null | undefined; - }; -} - -export const V3StakeModal: FC = ({ - poolStakingConfig, - isUnstakingModal, - stakedPositions, - unstakedPositions, - currentIncentive, - setShowModal, -}) => { - const isSafeEnv = useIsSafeEnvironment(); - const sdh = new SubgraphDataHelper( - useAppSelector(state => state.subgraph.currentValues), - ); - const { givTokenDistroHelper } = useGIVTokenDistroHelper(); - const { isAnimating, closeModal } = useModalAnimation(setShowModal); - - const positions = isUnstakingModal ? stakedPositions : unstakedPositions; - const { title, icon } = poolStakingConfig; - const [stakeStatus, setStakeStatus] = useState( - StakeState.UNKNOWN, - ); - const [txStatus, setTxStatus] = useState(); - const [tokenIdState, setTokenId] = useState(0); - const [reward, setReward] = useState(0n); - const [stream, setStream] = useState(0n); - const [claimableNow, setClaimableNow] = useState(0n); - const [givBackLiquidPart, setGivBackLiquidPart] = useState(0n); - - const { chain } = useAccount(); - const chainId = chain?.id; - const { address } = useAccount(); - - const handleStakeUnstake = async (tokenId: number) => { - if (!address || !chainId) return; - setTokenId(tokenId); - setStakeStatus(StakeState.CONFIRMING); - // console.log(tokenId, address, library, currentIncentive); - const tx = isUnstakingModal - ? await exit( - tokenId, - address, - chainId, - currentIncentive, - setStakeStatus, - ) - : await transfer( - tokenId, - address, - chainId, - currentIncentive, - setStakeStatus, - ); - try { - if (tx) { - setTxStatus(tx); - const { status } = await waitForTransaction(tx, isSafeEnv); - if (status) { - setStakeStatus(StakeState.CONFIRMED); - } else { - setStakeStatus(StakeState.ERROR); - } - } - } catch (error) { - setStakeStatus(StakeState.UNKNOWN); - captureException(error, { - tags: { - section: 'handleStakeUnstake', - }, - }); - } - }; - - const handleAction = async (tokenId: number) => { - const givTokenDistroBalance = sdh.getGIVTokenDistroBalance(); - const bnGIVback = BigInt(givTokenDistroBalance.givback); - const _reward = await getReward(tokenId, currentIncentive.key); - - const liquidReward = givTokenDistroHelper.getLiquidPart(_reward); - const streamPerWeek = - givTokenDistroHelper.getStreamPartTokenPerWeek(_reward); - setTokenId(tokenId); - setReward(liquidReward); - setStream(streamPerWeek); - setClaimableNow( - givTokenDistroHelper.getUserClaimableNow(givTokenDistroBalance), - ); - setGivBackLiquidPart(givTokenDistroHelper.getLiquidPart(bnGIVback)); - // setStakeStatus(StakeState.UNSTAKING); - }; - - return ( - - - {(stakeStatus === StakeState.UNKNOWN || - stakeStatus === StakeState.CONFIRMING || - stakeStatus === StakeState.UNSTAKING || - stakeStatus === StakeState.CONFIRM_UNSTAKE) && ( - - - - {title} - - - )} - {(stakeStatus === StakeState.UNKNOWN || - stakeStatus === StakeState.CONFIRMING) && ( - - {positions.map(position => ( - - ))} - - )} - {(stakeStatus === StakeState.UNSTAKING || - stakeStatus === StakeState.CONFIRM_UNSTAKE) && ( - - Please, unstake your NFT! - - { - handleStakeUnstake(0); - }} - loading={ - stakeStatus === StakeState.CONFIRM_UNSTAKE - } - /> - - - - )} - - {chainId && stakeStatus === StakeState.REJECT && ( - - )} - {chainId && stakeStatus === StakeState.SUBMITTING && ( - - )} - {chainId && stakeStatus === StakeState.CONFIRMED && ( - - )} - {chainId && stakeStatus === StakeState.ERROR && ( - - )} - - - - ); -}; - -const StakeModalContainer = styled.div` - padding: 24px 0; -`; - -const StakeModalTitle = styled(Flex)` - margin-bottom: 42px; -`; - -const StakeModalTitleText = styled(H4)` - margin-left: 54px; - color: ${neutralColors.gray[100]}; -`; - -const InnerModalPositions = styled.div` - width: 630px; - display: flex; - flex-direction: column; - padding: 24px; - gap: 36px; -`; - -const InnerModalStates = styled.div` - width: 370px; -`; - -export const PositionContainer = styled.div` - display: flex; - justify-content: space-between; - border-radius: 8px; - padding: 12px 24px; - background: ${brandColors.giv[400]}; - color: ${neutralColors.gray[100]}; -`; - -export const PositionInfo = styled.div` - display: flex; - flex-direction: column; - gap: 8px; - color: ${neutralColors.gray[100]}; -`; - -export const PositionInfoRow = styled(Flex)` - align-items: center; - gap: 8px; -`; - -export const TokenAmountRow = styled(Flex)` - align-items: center; - gap: 4px; -`; - -export const StyledOverline = styled(Overline)` - color: ${brandColors.deep[100]}; -`; - -const RoundedInfo = styled.div` - background: ${brandColors.giv[600]}; - border-radius: 28px; - font-weight: bold; - padding: 4px 10px; -`; - -export const TokenValue = styled(B)``; - -export const PositionActions = styled.div` - display: flex; - width: 180px; - flex-direction: column; - gap: 12px; -`; - -export const FullWidthButton = styled(Button)` - width: 100%; -`; - -export const HarvestContainer = styled.div` - margin: auto; - padding: 0 24px; - width: 630px; -`; - -export const HarvestButtonContainer = styled.div` - margin-top: 36px; -`; diff --git a/src/components/project-card/ProjectCard.tsx b/src/components/project-card/ProjectCard.tsx index 63642b081d..6d3824a2fc 100644 --- a/src/components/project-card/ProjectCard.tsx +++ b/src/components/project-card/ProjectCard.tsx @@ -78,6 +78,12 @@ const ProjectCard = (props: IProjectCard) => { const { activeStartedRound, activeQFRound } = getActiveRound(qfRounds); const hasFooter = activeStartedRound || verified; + const { + allocatedFundUSDPreferred, + allocatedFundUSD, + allocatedTokenSymbol, + } = activeQFRound || {}; + const projectLink = slugToProjectView(slug); const donateLink = slugToProjectDonate(slug); @@ -235,14 +241,20 @@ const ProjectCard = (props: IProjectCard) => { calculateTotalEstimatedMatching( projectDonationsSqrtRootSum, allProjectsSum, - matchingPool, + allocatedFundUSDPreferred + ? allocatedFundUSD + : matchingPool, activeStartedRound?.maximumReward, ), - '$', + allocatedFundUSDPreferred + ? '$' + : '', locale, true, ), - )} + )}{' '} + {!allocatedFundUSDPreferred && + allocatedTokenSymbol} diff --git a/src/components/project-card/ProjectCardAlt.tsx b/src/components/project-card/ProjectCardAlt.tsx index 8922f07725..e450cfd251 100644 --- a/src/components/project-card/ProjectCardAlt.tsx +++ b/src/components/project-card/ProjectCardAlt.tsx @@ -8,7 +8,6 @@ import { Flex, } from '@giveth/ui-design-system'; import styled from 'styled-components'; -import { useIntl } from 'react-intl'; import Link from 'next/link'; import ProjectCardImage from './ProjectCardImage'; import ProjectCardOrgBadge from './ProjectCardOrgBadge'; @@ -36,13 +35,11 @@ const ProjectCard = (props: IProjectCard) => { verified, adminUser, slug, - totalDonations, organization, } = project; const { name, walletAddress } = adminUser || {}; const orgLabel = organization?.label; - const { formatMessage } = useIntl(); const pfpToken = useGiverPFPToken( adminUser?.walletAddress, adminUser?.avatar, diff --git a/src/components/project-card/ProjectCardOrgBadge.tsx b/src/components/project-card/ProjectCardOrgBadge.tsx index 987274aa67..bf02a5147a 100644 --- a/src/components/project-card/ProjectCardOrgBadge.tsx +++ b/src/components/project-card/ProjectCardOrgBadge.tsx @@ -1,6 +1,7 @@ import React from 'react'; import styled from 'styled-components'; import { useIntl } from 'react-intl'; +import Image from 'next/image'; import { neutralColors, Overline, @@ -52,7 +53,12 @@ const ProjectCardOrgBadge = ({ {formatMessage({ id: 'label.project_by' })}:   - {organization} + {organization ); @@ -72,11 +78,9 @@ const ProjectCardOrgBadge = ({ }; const ImageContainer = styled.div` - max-width: 100px; - img { - width: 100%; - height: auto; - } + position: relative; + width: 100px; + height: 100%; `; const HomeViewContainer = styled(FlexCenter)<{ $isHover: boolean }>` diff --git a/src/components/views/Errors/ErrorsIndex.sc.ts b/src/components/views/Errors/ErrorsIndex.sc.ts index 334e3b263b..d1c83c9f99 100644 --- a/src/components/views/Errors/ErrorsIndex.sc.ts +++ b/src/components/views/Errors/ErrorsIndex.sc.ts @@ -21,11 +21,9 @@ export const SocialContainer = styled.div` } `; -export const CustomBigWarningImage = styled.img` +export const CustomBigWarningImage = styled(Image)` opacity: 0.3; position: absolute; - width: 220px; - height: 220px; top: 100px; left: -70px; display: none; @@ -35,11 +33,9 @@ export const CustomBigWarningImage = styled.img` } `; -export const CustomSmallWarningImage = styled.img` +export const CustomSmallWarningImage = styled(Image)` opacity: 0.3; position: absolute; - width: 120px; - height: 120px; bottom: 100px; right: 70px; display: none; @@ -49,11 +45,9 @@ export const CustomSmallWarningImage = styled.img` } `; -export const CustomGearImage = styled.img` +export const CustomGearImage = styled(Image)` opacity: 0.6; position: absolute; - width: 120px; - height: 120px; top: 70px; left: -30px; display: none; @@ -63,11 +57,9 @@ export const CustomGearImage = styled.img` } `; -export const CustomGearsImage = styled.img` +export const CustomGearsImage = styled(Image)` opacity: 0.6; position: absolute; - width: 160px; - height: 160px; bottom: 70px; right: -30px; display: none; diff --git a/src/components/views/Errors/ErrorsIndex.tsx b/src/components/views/Errors/ErrorsIndex.tsx index 064527529e..b5621c3da1 100644 --- a/src/components/views/Errors/ErrorsIndex.tsx +++ b/src/components/views/Errors/ErrorsIndex.tsx @@ -57,11 +57,17 @@ const ErrorsIndex = ({ statusCode }: IErrorProps) => { { - - + + { + return ( + + QF Banner + + ); +}; + +const BannerContainer = styled.div` + position: relative; + /* padding-top: 160px; + padding-bottom: 160px; */ + height: 500px; + img { + -webkit-user-drag: none; + -khtml-user-drag: none; + -moz-user-drag: none; + -o-user-drag: none; + user-drag: none; + } +`; diff --git a/src/components/views/archivedQFRounds/ArchivedQFRounds.view.tsx b/src/components/views/archivedQFRounds/ArchivedQFRounds.view.tsx new file mode 100644 index 0000000000..30f48f7222 --- /dev/null +++ b/src/components/views/archivedQFRounds/ArchivedQFRounds.view.tsx @@ -0,0 +1,98 @@ +import React, { useEffect, useState } from 'react'; +import styled from 'styled-components'; +import { Container, Flex } from '@giveth/ui-design-system'; +import { ArchivedQFBanner } from './ArchivedQFBanner'; +import { EQFPageStatus, QFHeader } from './QFHeader'; +import { client } from '@/apollo/apolloClient'; +import { IArchivedQFRound } from '@/apollo/types/types'; +import { ArchivedQFRoundsTable } from './ArchivedQFRoundsTable'; +import { ArchivedQFRoundsMiddleBanner } from './ArchivedQFRoundsMiddleBanner'; +import { FETCH_ARCHIVED_QF_ROUNDS } from '@/apollo/gql/gqlQF'; +import { useArchivedQFRounds } from './archivedQfRounds.context'; +import { EQFRoundsSortBy } from '@/apollo/types/gqlEnums'; + +enum EQfArchivedRoundsSort { + allocatedFund = 'allocatedFund', + totalDonations = 'totalDonations', + uniqueDonors = 'uniqueDonors', + beginDate = 'beginDate', +} + +enum EOrderDirection { + ASC = 'ASC', + DESC = 'DESC', +} + +export const ArchivedQFRoundsView = () => { + const [archivedQFRounds, setArchivedQFRounds] = useState< + IArchivedQFRound[] + >([]); + const { orderBy } = useArchivedQFRounds(); + + useEffect(() => { + let field = EQfArchivedRoundsSort.beginDate; + let direction = EOrderDirection.DESC; + switch (orderBy) { + case EQFRoundsSortBy.MATCHING_POOL: + field = EQfArchivedRoundsSort.allocatedFund; + direction = EOrderDirection.DESC; + break; + case EQFRoundsSortBy.UNIQUE_DONORS: + field = EQfArchivedRoundsSort.uniqueDonors; + direction = EOrderDirection.DESC; + break; + case EQFRoundsSortBy.NEWEST: + field = EQfArchivedRoundsSort.beginDate; + direction = EOrderDirection.DESC; + break; + case EQFRoundsSortBy.OLDEST: + field = EQfArchivedRoundsSort.beginDate; + direction = EOrderDirection.ASC; + break; + default: + break; + } + + const fetchQFRounds = async () => { + const { + data: { qfArchivedRounds }, + } = await client.query({ + query: FETCH_ARCHIVED_QF_ROUNDS, + fetchPolicy: 'network-only', + variables: { + orderBy: { + field, + direction, + }, + }, + }); + setArchivedQFRounds(qfArchivedRounds); + }; + fetchQFRounds(); + }, [orderBy]); + return ( + + + + + + + + + + + + ); +}; + +const Wrapper = styled(Flex)` + flex-direction: column; + gap: 40px; +`; diff --git a/src/components/views/archivedQFRounds/ArchivedQFRoundsMiddleBanner.tsx b/src/components/views/archivedQFRounds/ArchivedQFRoundsMiddleBanner.tsx new file mode 100644 index 0000000000..5f6ce7897b --- /dev/null +++ b/src/components/views/archivedQFRounds/ArchivedQFRoundsMiddleBanner.tsx @@ -0,0 +1,25 @@ +import { Container, semanticColors } from '@giveth/ui-design-system'; +import { useIntl } from 'react-intl'; +import Image from 'next/image'; +import { Box, Title, Caption } from '../projects/MiddleBanners/common.sc'; + +export const ArchivedQFRoundsMiddleBanner = () => { + const { formatMessage } = useIntl(); + return ( + + arc + + + {formatMessage({ + id: 'component.qf_middle_banner.title', + })} + + + {formatMessage({ + id: 'component.qf_middle_banner.desc', + })} + + + + ); +}; diff --git a/src/components/views/archivedQFRounds/ArchivedQFRoundsSort.tsx b/src/components/views/archivedQFRounds/ArchivedQFRoundsSort.tsx new file mode 100644 index 0000000000..bc7ac6d2c3 --- /dev/null +++ b/src/components/views/archivedQFRounds/ArchivedQFRoundsSort.tsx @@ -0,0 +1,80 @@ +import { + Flex, + IconAdminNotif16, + IconArrowBottom, + IconArrowTop, + IconDonation16, +} from '@giveth/ui-design-system'; +import { type ReactElement } from 'react'; +import { useIntl } from 'react-intl'; +import Select from 'react-select'; +import { + Option, + Control, + SortingLabel, + selectStyles, + DropdownIndicator, +} from '../projects/sort/ProjectsSortSelect'; +import { EQFRoundsSortBy } from '@/apollo/types/gqlEnums'; +import { useArchivedQFRounds } from './archivedQfRounds.context'; + +export interface IArchivedQFRoundsSort { + icon: ReactElement; + label: string; + value: EQFRoundsSortBy; + color?: string; +} + +export const ArchivedQFRoundsSort = () => { + const { formatMessage } = useIntl(); + const { orderBy, setOrderBy } = useArchivedQFRounds(); + + let sortByOptions: IArchivedQFRoundsSort[] = [ + { + label: formatMessage({ id: 'label.matching_pool' }), + value: EQFRoundsSortBy.MATCHING_POOL, + icon: , + }, + { + label: formatMessage({ id: 'label.number_of_unique_donors' }), + value: EQFRoundsSortBy.UNIQUE_DONORS, + icon: , + }, + { + label: formatMessage({ id: 'label.newest' }), + value: EQFRoundsSortBy.NEWEST, + icon: , + }, + { + label: formatMessage({ id: 'label.oldest' }), + value: EQFRoundsSortBy.OLDEST, + icon: , + }, + ]; + + return ( + + + {formatMessage({ id: 'label.sort_by' })} + +