Skip to content

Commit

Permalink
Merge branch 'develop' into bug-in-donation-page-for-project-with-def…
Browse files Browse the repository at this point in the history
…ault-cover
  • Loading branch information
RamRamez committed Aug 10, 2023
2 parents 9b3e7b6 + 9853df7 commit d12df33
Show file tree
Hide file tree
Showing 22 changed files with 376 additions and 231 deletions.
12 changes: 9 additions & 3 deletions lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"component.givback_toast.desc": "Obteniu GIVbacks fent una donació a aquest projecte.",
"component.input.search_name": "Cerca per nom",
"component.input.search_or_paste": "Cerca per nom o enganxa una adreça",
"component.join_discord.title": "",
"component.join_discord.body": "",
"component.join_discord.body_2": "",
"component.join_discord.body": "Swing by our 👋",
"component.join_discord.body_2": "channel, and we’ll let you know who’s around to meet up.",
"component.join_discord.title": "We’d love to hear from you on Discord!",
"component.passport_card.desc": "Verify your Gitcoin Passport to prove your donor uniqueness and ensure your donations get matched in quadratic funding rounds.",
"component.pfp_eligibility_modal.content.not_eligible": "La cartera que has connectat no està a la nostra llista per fer minting avançat. Si penses que és un error, contacta amb el nostre equip. Consulta la nostra documentació per a més detalls sobre elegibilitat, o torna quan s'obri el minting públic el 24 de març del 2023 a les 16:00 UTC.",
"component.pfp_eligibility_modal.content.success": "Ets elegible per fer mint del teu Giver avançat! Gràcies per donar suport a Giveth",
Expand Down Expand Up @@ -249,6 +249,7 @@
"label.delete": "Esborrar",
"label.delete_pic": "Eliminar imatge",
"label.didnt_get_the_givdrop": "No has rebut el GIVdrop?",
"label.discover_our": "Discover our",
"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.dismiss": "Descartar",
Expand Down Expand Up @@ -347,6 +348,7 @@
"label.funding_from_traces": "Finançament de Traces",
"label.generate_your_unique_url": "Obté la teva URL única per compartir amb la teva xarxa.",
"label.getting_started": "Començant",
"label.get_a": "Get a",
"label.get_crypto": "Obtén cripto",
"label.get_crypto_with_mtpelerin": "Obtén Crypto amb Mt Pelerin",
"label.get_giv": "Obteniu GIV",
Expand All @@ -372,6 +374,7 @@
"label.give": "Dóna",
"label.giveconomy": "GIVeconomy",
"label.giveconomy_activities": "Activitats de GIVeconomy",
"label.givers_nft": "Givers NFT",
"label.givers_pfp_holders": "Givers PFP Holders will be able to claim their own unique ",
"label.giveth_builds_community": "Giveth construeix comunitat",
"label.giveth_builds_community.bullet.four": "Giveth contacta activament amb iniciatives similars que veu com a col·laboradors potencials, en lloc de competidors.",
Expand Down Expand Up @@ -479,6 +482,7 @@
"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_discord": "uneix-te al nostre Discord",
"label.join_page": "Uniu-vos a la comunitat",
"label.join_us": "Join Us",
"label.join_us_on": "Uneix-te a nosaltres a",
"label.join_us_on_any_social_media": "Uneix-te a qualsevol dels nostres canals socials",
"label.just_launched": "Acabat de llançar",
Expand All @@ -489,6 +493,7 @@
"label.last_updated": "Última Actualització",
"label.latest_updates": "Últimes actualitzacions",
"label.learn": "Aprendre",
"label.learn_how_to": "Learn how to",
"label.learn_how_to_become_an_active_part": "Aprèn com convertir-te en un agent actiu de la nostra xarxa de donacions.",
"label.learn_more": "Aprèn-ne més",
"label.learn_more_about": "Learn more about the benefits.",
Expand Down Expand Up @@ -536,6 +541,7 @@
"label.mint_again": "Encunya una altra vegada",
"label.mint_your_giver": "Encunya el teu Giver",
"label.min_one_round": "Mín 1 ronda",
"label.mission": "Mission",
"label.mission_vission": "Misió i Visió",
"label.more_about_us": "Més sobre nosaltres",
"label.mtpelerin_pricing_starts_at_zero": "La tarifa de MtPelerin comença en 0%, molt difícil de superar! En general, intentem mantenir la nostra estructura de preus tant atractiva, simple i transparent com sigui possible. Donem a l'usuari la millor taxa de canvi que podem trobar com a comerciants professionals al mercat. Cobrem un petit percentatge a sobre d'aquesta tarifa per sobre dels 500$ per any, per sota d'això no cobrem res.",
Expand Down
10 changes: 8 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"component.givback_toast.desc": "You get GIVbacks by donating to this project.",
"component.input.search_name": "Search name",
"component.input.search_or_paste": "Search name or paste an address",
"component.join_discord.title": "We’d love to hear from you on Discord!",
"component.join_discord.body": "Swing by our \uD83D\uDC4B",
"component.join_discord.body": "Swing by our 👋",
"component.join_discord.body_2": "channel, and we’ll let you know who’s around to meet up.",
"component.join_discord.title": "We’d love to hear from you on Discord!",
"component.passport_card.desc": "Verify your Gitcoin Passport to prove your donor uniqueness and ensure your donations get matched in quadratic funding rounds.",
"component.pfp_eligibility_modal.content.not_eligible": "The wallet address you connected with is not on our allowlist for early minting. If you think this is a mistake, contact our team. Check out our documentation for full details on eligibility, or come back when public minting opens on Mar 24, 2023, 16:00 UTC.",
"component.pfp_eligibility_modal.content.success": "You are eligible to mint your Giver early! Thanks for supporting Giveth",
Expand Down Expand Up @@ -249,6 +249,7 @@
"label.delete": "Delete",
"label.delete_pic": "Delete picture",
"label.didnt_get_the_givdrop": "Didn’t get the GIVdrop?",
"label.discover_our": "Discover our",
"label.discover_our_roadmap": "discover our roadmap",
"label.discover_what_makes_giveth_different": "Discover what makes Giveth different from other donation platforms",
"label.dismiss": "Dismiss",
Expand Down Expand Up @@ -347,6 +348,7 @@
"label.funding_from_traces": "Funding from Traces",
"label.generate_your_unique_url": "Get your unique URL to share with your network.",
"label.getting_started": "Getting Started",
"label.get_a": "Get a",
"label.get_crypto": "Get crypto",
"label.get_crypto_with_mtpelerin": "Get Crypto with Mt Pelerin",
"label.get_giv": "Get GIV",
Expand All @@ -372,6 +374,7 @@
"label.give": "Give",
"label.giveconomy": "GIVeconomy",
"label.giveconomy_activities": "GIVeconomy activities",
"label.givers_nft": "Givers NFT",
"label.givers_pfp_holders": "Givers PFP Holders will be able to claim their own unique ",
"label.giveth_builds_community": "Giveth builds Community",
"label.giveth_builds_community.bullet.four": "Giveth proactively reaches out to similar initiatives which we see as potential collaborators, as opposed to competitors.",
Expand Down Expand Up @@ -479,6 +482,7 @@
"label.join_our_community_driven_movement": "Join our community-driven movement to transform the way we fund nonprofits and social causes.",
"label.join_our_discord": "join our discord",
"label.join_page": "Join Page",
"label.join_us": "Join Us",
"label.join_us_on": "join us on",
"label.join_us_on_any_social_media": "Join us on any of our social channels",
"label.just_launched": "Just launched",
Expand All @@ -489,6 +493,7 @@
"label.last_updated": "Last Updated",
"label.latest_updates": "Latest Updates",
"label.learn": "Learn",
"label.learn_how_to": "Learn how to",
"label.learn_how_to_become_an_active_part": "Learn how to become an active part of our giving network.",
"label.learn_more": "Learn more",
"label.learn_more_about": "Learn more about the benefits.",
Expand Down Expand Up @@ -536,6 +541,7 @@
"label.mint_again": "Mint Again",
"label.mint_your_giver": "Mint your Giver",
"label.min_one_round": "Min 1 round",
"label.mission": "Mission",
"label.mission_vission": "Mission & Vision",
"label.more_about_us": "More about us",
"label.mtpelerin_pricing_starts_at_zero": "MtPelerin's pricing starts at 0%, hard to beat that! Overall, we try to keep our pricing structure as attractive, simple and transparent as possible. We give the user the best exchange rate that we can find as pro traders on the market. We charge a small percentage on top of that rate above $500 per year, below that we don't charge anything.",
Expand Down
12 changes: 9 additions & 3 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"component.givback_toast.desc": "Obtienes GIVbacks al donar a este proyecto.",
"component.input.search_name": "Busca un nombre",
"component.input.search_or_paste": "Busca un nombre o pega una dirección",
"component.join_discord.title": "",
"component.join_discord.body": "",
"component.join_discord.body_2": "",
"component.join_discord.body": "Swing by our 👋",
"component.join_discord.body_2": "channel, and we’ll let you know who’s around to meet up.",
"component.join_discord.title": "We’d love to hear from you on Discord!",
"component.passport_card.desc": "Verify your Gitcoin Passport to prove your donor uniqueness and ensure your donations get matched in quadratic funding rounds.",
"component.pfp_eligibility_modal.content.not_eligible": "La billetera que conectaste no esta en nuestra lista para hacer minting adelantado. Si piensas que fue un error, contacta a nuestro equipo. Revisa nuestra documentación para más detalle en elegibilidad, o regresa cuando el mint público inicie el dia 24 de Marzo, 2023 a las 16:00 UTC.",
"component.pfp_eligibility_modal.content.success": "Eres elegible para hacer mint de tu Giver adelantado! Gracias por tu apoyo a Giveth",
Expand Down Expand Up @@ -249,6 +249,7 @@
"label.delete": "Borrar",
"label.delete_pic": "Borrar imagen",
"label.didnt_get_the_givdrop": "¿No has recibido el GIVdrop?",
"label.discover_our": "Discover our",
"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.dismiss": "Ignorar",
Expand Down Expand Up @@ -347,6 +348,7 @@
"label.funding_from_traces": "Financiación de Traces",
"label.generate_your_unique_url": "Obtén tu URL única para compartir con tu comunidad.",
"label.getting_started": "Empezando",
"label.get_a": "Get a",
"label.get_crypto": "Obtén cripto",
"label.get_crypto_with_mtpelerin": "Obtén Crypto con Mt Pelerin",
"label.get_giv": "Obtén GIV",
Expand All @@ -372,6 +374,7 @@
"label.give": "Da",
"label.giveconomy": "GIVeconomy",
"label.giveconomy_activities": "Actividades en GIVeconomy",
"label.givers_nft": "Givers NFT",
"label.givers_pfp_holders": "Givers PFP Holders will be able to claim their own unique ",
"label.giveth_builds_community": "Giveth construye comunidad",
"label.giveth_builds_community.bullet.four": "Giveth se acerca de forma proactiva a iniciativas similares para colaborar, en vez de competir.",
Expand Down Expand Up @@ -479,6 +482,7 @@
"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_discord": "únete a nuestro Discord",
"label.join_page": "Únete a la comunidad",
"label.join_us": "Join Us",
"label.join_us_on": "Únete en",
"label.join_us_on_any_social_media": "Únete en cualquier de nuestros canales sociales",
"label.just_launched": "Acabado de lanzar",
Expand All @@ -489,6 +493,7 @@
"label.last_updated": "Ultima Actualización",
"label.latest_updates": "Últimas actualizaciones",
"label.learn": "Aprender",
"label.learn_how_to": "Learn how to",
"label.learn_how_to_become_an_active_part": "Aprenda cómo convertirse en un agente activo de nuestra red de donaciones.",
"label.learn_more": "Aprende más",
"label.learn_more_about": "Learn more about the benefits.",
Expand Down Expand Up @@ -536,6 +541,7 @@
"label.mint_again": "Haz otro mint",
"label.mint_your_giver": "Mintea tu Giver",
"label.min_one_round": "Min 1 ronda",
"label.mission": "Mission",
"label.mission_vission": "Misión & Visión",
"label.more_about_us": "Más acerca de nosotros",
"label.mtpelerin_pricing_starts_at_zero": "La tarifa de MtPelerin comienza en 0%, ¡muy difícil de superar! En general, tratamos de mantener nuestra estructura de precios lo más atractiva, simple y transparente posible. Damos al usuario la mejor tasa de cambio que podemos encontrar como comerciantes profesionales en el mercado. Cobramos un pequeño porcentaje a esa tarifa cuando se superan los $500 por año, por debajo de eso no cobramos nada.",
Expand Down
7 changes: 5 additions & 2 deletions src/components/Header/Header.sc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,14 @@ export const SmallCreateProject = styled(Button)`
}
`;

export const LargeCreateProject = styled.div`
export const LargeCreateProject = styled.div<{ isTexty?: boolean }>`
display: none;
> button {
${props => props.isTexty && `height: 50px;`}
box-shadow: ${props =>
props.theme === ETheme.Dark ? '' : Shadow.Dark[500]};
props.theme === ETheme.Dark || props.isTexty
? ''
: Shadow.Dark[500]};
}
${mediaQueries.laptopS} {
Expand Down
22 changes: 12 additions & 10 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
Logo,
SmallCreateProjectParent,
LargeCreateProject,
HeaderLink,
HomeButton,
SearchButton,
GLinkNoWrap,
Expand Down Expand Up @@ -51,6 +50,7 @@ import { HomeSidebar } from '../sidebar/HomeSidebar';
import { fetchMainCategories } from '@/features/general/general.thunk';
import { ItemsProvider } from '@/context/Items.context';
import { isGIVeconomyRoute as checkIsGIVeconomyRoute } from '@/lib/helpers';
import { CommunityMenu } from '../menu/CommunityMenu';

export interface IHeader {
theme?: ETheme;
Expand All @@ -73,6 +73,8 @@ const Header: FC<IHeader> = () => {
const theme = useAppSelector(state => state.general.theme);

const router = useRouter();
const isProjectPage = router.route.startsWith(Routes.Project + '/');

const { formatMessage } = useIntl();
const isDesktop = useMediaQuery(device.laptopL);
const isMobile = useMediaQuery(device.mobileL);
Expand Down Expand Up @@ -228,13 +230,13 @@ const Header: FC<IHeader> = () => {
>
<GIVeconomyMenu />
</LinkWithMenu>
<HeaderLink theme={theme}>
<Link href={Routes.Join}>
<GLink size='Big'>
{formatMessage({ id: 'label.community' })}
</GLink>
</Link>
</HeaderLink>
<LinkWithMenu
title={formatMessage({ id: 'label.community' })}
isHeaderShowing={showHeader}
href={Routes.Join}
>
<CommunityMenu />
</LinkWithMenu>
<SearchButton
theme={theme}
onClick={() => dispatch(setShowSearchModal(true))}
Expand All @@ -250,13 +252,13 @@ const Header: FC<IHeader> = () => {
)}
<FlexSpacer />
<Flex gap='8px'>
<LargeCreateProject>
<LargeCreateProject isTexty={isProjectPage}>
<Button
label={formatMessage({
id: 'component.button.create_project',
})}
size='small'
buttonType='primary'
buttonType={isProjectPage ? 'texty-primary' : 'primary'}
onClick={handleCreateButton}
/>
</LargeCreateProject>
Expand Down
76 changes: 76 additions & 0 deletions src/components/menu/CommunityItems.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React, { FC } from 'react';
import Link from 'next/link';
import { GLink } from '@giveth/ui-design-system';
import { useIntl } from 'react-intl';
import { useAppSelector } from '@/features/hooks';
import { ItemRow, ItemTitle } from './common';
import Routes from '@/lib/constants/Routes';
import { Item } from './Item';
import links from '@/lib/constants/links';

const communityItems = [
{
title: 'label.get_a',
label: 'label.givers_nft',
href: Routes.NFT,
},
{
title: 'label.learn_how_to',
label: 'label.join_us',
href: Routes.Join,
},
{
title: 'label.discover_our',
label: 'label.mission',
href: links.OUR_MISSION,
isExternal: true,
},
];

export const CommunityItems = () => {
return (
<>
{communityItems.map((item, idx) =>
item.isExternal ? (
<a
key={idx}
href={item.href}
target='_blank'
rel='noopener noreferrer'
>
<CommunityItem item={item} />
</a>
) : (
<Link key={idx} href={item.href}>
<CommunityItem item={item} />
</Link>
),
)}
</>
);
};

interface ICommunityItemProps {
item: {
title: string;
label: string;
href: string;
isExternal?: boolean;
};
}

export const CommunityItem: FC<ICommunityItemProps> = ({ item }) => {
const theme = useAppSelector(state => state.general.theme);
const { formatMessage } = useIntl();

return (
<Item theme={theme}>
<ItemTitle theme={theme}>
{formatMessage({ id: item.title })}
</ItemTitle>
<ItemRow>
<GLink>{formatMessage({ id: item.label })}</GLink>
</ItemRow>
</Item>
);
};
22 changes: 22 additions & 0 deletions src/components/menu/CommunityMenu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import styled from 'styled-components';

import { useAppSelector } from '@/features/hooks';
import { BaseMenuContainer } from './common';
import { CommunityItems } from './CommunityItems';

export const CommunityMenu = () => {
const theme = useAppSelector(state => state.general.theme);
return (
<MenuContainer theme={theme}>
<CommunityItems />
</MenuContainer>
);
};

const MenuContainer = styled(BaseMenuContainer)`
display: flex;
flex-direction: column;
width: 239px;
gap: 4px;
`;
Loading

0 comments on commit d12df33

Please sign in to comment.