Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadranjbarz committed Jul 21, 2024
2 parents 2e07ff1 + be57d6a commit 6a9f169
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/components/views/donate/DonationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const DonationCard = () => {

return (
<DonationCardWrapper>
<Title>
<Title id='donation-visit'>
{formatMessage({ id: 'label.how_do_you_want_to_donate' })}
</Title>
<Flex>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
import styled from 'styled-components';
import Image from 'next/image';
import { brandColors, FlexCenter } from '@giveth/ui-design-system';
import {
brandColors,
FlexCenter,
semanticColors,
} from '@giveth/ui-design-system';
import ExternalLink from '@/components/ExternalLink';
import Regen from '/public/images/regen-token.png';

const FundraisingBanner = () => {
const AnnouncementBanner = () => {
return (
<Wrapper>
<PStyled>
<>The Giveth website is experiencing high traffic due to the </>
<>
<ExternalLink href='https://paragraph.xyz/@regen/introducing-regen'>
<Purple>$REGEN token announcement.</Purple>
Try out our new Recurring Donations feature for a chance to
to WIN PRIZES this summer! 🏆
</>
<>
<ExternalLink href='https://blog.giveth.io/recurring-donation-rally-win-big-this-sumer-with-recurring-donations-on-giveth-092798f8b988'>
<Purple>
Read up on the contest details on the Giveth blog.
</Purple>
</ExternalLink>
<ImageStyled
src={Regen}
alt='Gitcoin Grants'
width={24}
height={24}
/>
</>
<>You may experience slow loading times, we're working on it.</>
</PStyled>
</Wrapper>
);
Expand Down Expand Up @@ -49,9 +50,9 @@ const Wrapper = styled(FlexCenter)`
padding: 16px;
text-align: center;
gap: 4px;
background: ${brandColors.mustard[300]};
background: ${semanticColors.jade[100]};
z-index: 99;
position: sticky;
`;

export default FundraisingBanner;
export default AnnouncementBanner;
4 changes: 2 additions & 2 deletions src/components/views/homepage/HomeIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { FETCH_HOMEPAGE_DATA } from '@/apollo/gql/gqlHomePage';
import { LatestUpdatesBlock } from './latestUpdates/LatestUpdatesBlock';
import StorageLabel from '@/lib/localStorage';
import TorusBanner from './TorusBanner';
// import FundraisingBanner from './FundraisingBanner';
import AnnouncementBanner from './AnnouncementBanner';

const HomeIndex: FC<IHomeRoute> = props => {
const {
Expand Down Expand Up @@ -66,7 +66,7 @@ const HomeIndex: FC<IHomeRoute> = props => {

return (
<Wrapper>
{/* <FundraisingBanner /> */}
<AnnouncementBanner />
{showTorusBanner && <TorusBanner />}
<IntroBlock />
<Separator />
Expand Down
8 changes: 3 additions & 5 deletions src/components/views/homepage/ProjectsCampaignBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ProjectsCampaignBlock: FC<IProjectsCampaignBlockProps> = ({
<>
<TopContainer>
<BlockHeader>
<BlockTitle weight={700}>
<BlockTitle id='feature-projects-carousel' weight={700}>
{campaign.hashtags && campaign.hashtags.length > 0
? campaign.hashtags.map(hashtag => `#${hashtag} `)
: ''}
Expand All @@ -66,11 +66,9 @@ const ProjectsCampaignBlock: FC<IProjectsCampaignBlockProps> = ({
<BottomSection>
<Title>
<H1 weight={700}>{campaign.title}</H1>
<Link
id='Explore_Row'
href={campaignLinkGenerator(campaign) || ''}
>
<Link href={campaignLinkGenerator(campaign) || ''}>
<Button
id='Explore_Row'
buttonType='texty-primary'
label={formatMessage({
id: 'page.projects.title.explore',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const CampaignsBlock: FC<ICampaignsBlockProps> = ({ campaigns }) => {
<CampaignsBlockWrapper>
<ContainerRelative>
<BlockHeader>
<BlockTitle>
<BlockTitle id='feature-campaigns-carousel'>
{formatMessage({
id: 'label.whats_up_on_giveth',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const CampaignsSlide: FC<ICampaignsSlideProps> = ({ campaign }) => {
<H2 weight={700}>{campaign.title}</H2>
<Desc>{campaign.description}</Desc>
<Link href={campaignLinkGenerator(campaign) || ''}>
<ExploreLink>
<ExploreLink id='feature-campaigns-button'>
{formatMessage({ id: 'page.projects.title.explore' })}{' '}
<IconChevronRight32 />
</ExploreLink>
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useCreateEvmDonation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const useCreateEvmDonation = () => {
transaction = await retryFetchEVMTransaction(txHash);
if (transaction) {
donationData = {
chainId: transaction.chainId!,
chainId: chainId || token.networkId,
txHash: transaction.hash,
amount: amount,
token,
Expand Down Expand Up @@ -137,7 +137,7 @@ export const useCreateEvmDonation = () => {
return id;
} catch (e: any) {
await postRequest('/api/donation-backup', true, {
chainId: transaction?.chainId!,
chainId: chainId || token.networkId,
txHash: transaction?.hash,
amount: amount,
token,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useCreateSolanaDonation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const useCreateSolanaDonation = () => {
return id;
} catch (e: any) {
await postRequest('/api/donation-backup', true, {
chainId: transaction?.chainId!,
chainId: transaction?.chainId || 0,
txHash: transaction?.hash,
amount: amount,
token,
Expand Down

0 comments on commit 6a9f169

Please sign in to comment.