Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 2a788b0

Browse files
committed
Update
Signed-off-by: RakeshPotnuru <[email protected]>
1 parent 9bec385 commit 2a788b0

File tree

4 files changed

+115
-75
lines changed

4 files changed

+115
-75
lines changed

src/components/post/components/MoreArticles.jsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Container, Heading, SimpleGrid } from '@chakra-ui/react';
1+
import { Box, Center, Container, Heading, SimpleGrid } from '@chakra-ui/react';
22

33
import { ArticleCard } from '@/UIElements/index.js';
44
import { AdSense } from 'common/utils';
@@ -14,14 +14,16 @@ const RelatedArticles = ({ posts }) => {
1414
))}
1515
</SimpleGrid>
1616
</Container>
17-
<Box my={20}>
18-
<AdSense
19-
style={{ display: 'block' }}
20-
adFormat={'fluid'}
21-
adSlot={'3408517885'}
22-
data-ad-layout-key={'-f9+52+6z-e1+5b'}
23-
/>
24-
</Box>
17+
<Center>
18+
<Box my={20}>
19+
<AdSense
20+
style={{ display: 'block' }}
21+
adFormat={'fluid'}
22+
adSlot={'3408517885'}
23+
data-ad-layout-key={'-f9+52+6z-e1+5b'}
24+
/>
25+
</Box>
26+
</Center>
2527
</>
2628
);
2729
};

src/components/search/SearchPage.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import React, { useEffect, useState } from 'react';
2+
import { Box, Center } from '@chakra-ui/react';
23
import { useRouter } from 'next/router';
34
import { useLazyQuery } from '@apollo/client/react';
45

56
import { SearchPageBody, SearchPageHeader } from './components';
67
import { queries } from './queries';
8+
import { AdSense } from 'common/utils';
79

810
const SearchPage = ({
911
activeTab,
@@ -90,6 +92,16 @@ const SearchPage = ({
9092
loading={loading}
9193
error={variableError}
9294
/>
95+
<Center>
96+
<Box my={20}>
97+
<AdSense
98+
style={{ display: 'block' }}
99+
adFormat={'fluid'}
100+
adSlot={'3408517885'}
101+
data-ad-layout-key={'-f9+52+6z-e1+5b'}
102+
/>
103+
</Box>
104+
</Center>
93105
</>
94106
);
95107
};

src/components/snippet/components/MoreSnippets.jsx

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
1-
import { Container, Heading, SimpleGrid } from '@chakra-ui/react';
1+
import { Box, Center, Container, Heading, SimpleGrid } from '@chakra-ui/react';
22

33
import { SnippetCard } from '@/UIElements/index.js';
4+
import { AdSense } from 'common/utils';
45

56
const MoreSnippets = ({ snippets, loading }) => {
67
return (
7-
<Container maxW={'container.md'} my={20}>
8-
<Heading color={'brand.50'}>MORE SNIPPETS</Heading>
9-
<SimpleGrid columns={{ base: 1, md: 2 }} spacing={5} my={10}>
10-
{snippets.map((snippet) => (
11-
<SnippetCard key={snippet.id} snippet={snippet} loading={loading} />
12-
))}
13-
</SimpleGrid>
14-
</Container>
8+
<>
9+
<Container maxW={'container.md'} my={20}>
10+
<Heading color={'brand.50'}>MORE SNIPPETS</Heading>
11+
<SimpleGrid columns={{ base: 1, md: 2 }} spacing={5} my={10}>
12+
{snippets.map((snippet) => (
13+
<SnippetCard key={snippet.id} snippet={snippet} loading={loading} />
14+
))}
15+
</SimpleGrid>
16+
</Container>
17+
<Center>
18+
<Box my={20}>
19+
<AdSense
20+
style={{ display: 'block' }}
21+
adFormat={'fluid'}
22+
adSlot={'3408517885'}
23+
data-ad-layout-key={'-f9+52+6z-e1+5b'}
24+
/>
25+
</Box>
26+
</Center>
27+
</>
1528
);
1629
};
1730

src/components/supportMe/SupportMePage.jsx

Lines changed: 70 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -17,70 +17,83 @@ import { CheckCircleIcon } from '@chakra-ui/icons';
1717

1818
import { KofiWidget } from './components';
1919
import siteConfig from '../../../config/site.config';
20+
import { AdSense } from 'common/utils';
2021

2122
const SupportMePage = () => {
2223
const bgColor = useColorModeValue('gray.100', 'gray.700');
2324
return (
24-
<Box m={{ base: '5% 10%', '2xl': '5% 15%' }}>
25-
<Heading textAlign={'center'}>SUPPORT ME 💖</Heading>
26-
<Text textAlign={'center'} my={4}>
27-
Content creation is hard without your support.
28-
</Text>
29-
<Box my={8}>
30-
<SimpleGrid my={8} columns={{ base: 1, md: 3 }}>
31-
<Box>
32-
<Heading size={'md'}>Follow me on Twitter</Heading>
33-
<Text my={4}>
34-
Help me reach more audience. I also share my thoughts, resources
35-
and more useful stuff.
36-
</Text>
37-
</Box>
38-
<Spacer />
39-
<Center bg={bgColor} p={12} my={2} rounded={'md'}>
40-
<Link href={siteConfig.urls.socials.twitter} isExternal>
41-
<Button
42-
leftIcon={<FaTwitter />}
43-
bg={'twitter'}
44-
color={'white'}
45-
shadow={'md'}
46-
_hover={{ bg: 'twitter', opacity: 0.8 }}
47-
_active={{ bg: 'twitter', opacity: 0.8 }}
48-
>
49-
Follow
50-
</Button>
51-
</Link>
52-
</Center>
53-
</SimpleGrid>
54-
</Box>
25+
<>
26+
<Box m={{ base: '5% 10%', '2xl': '5% 15%' }}>
27+
<Heading textAlign={'center'}>SUPPORT ME 💖</Heading>
28+
<Text textAlign={'center'} my={4}>
29+
Content creation is hard without your support.
30+
</Text>
31+
<Box my={8}>
32+
<SimpleGrid my={8} columns={{ base: 1, md: 3 }}>
33+
<Box>
34+
<Heading size={'md'}>Follow me on Twitter</Heading>
35+
<Text my={4}>
36+
Help me reach more audience. I also share my thoughts, resources
37+
and more useful stuff.
38+
</Text>
39+
</Box>
40+
<Spacer />
41+
<Center bg={bgColor} p={12} my={2} rounded={'md'}>
42+
<Link href={siteConfig.urls.socials.twitter} isExternal>
43+
<Button
44+
leftIcon={<FaTwitter />}
45+
bg={'twitter'}
46+
color={'white'}
47+
shadow={'md'}
48+
_hover={{ bg: 'twitter', opacity: 0.8 }}
49+
_active={{ bg: 'twitter', opacity: 0.8 }}
50+
>
51+
Follow
52+
</Button>
53+
</Link>
54+
</Center>
55+
</SimpleGrid>
56+
</Box>
5557

56-
<Box my={8}>
57-
<SimpleGrid my={8} columns={{ base: 1, md: 2 }} spacing={6}>
58-
{/* Ko-fi widget */}
59-
<KofiWidget />
58+
<Box my={8}>
59+
<SimpleGrid my={8} columns={{ base: 1, md: 2 }} spacing={6}>
60+
{/* Ko-fi widget */}
61+
<KofiWidget />
6062

61-
<Box>
62-
<Heading size={'md'}>Donate</Heading>
63-
<Text my={4}>
64-
Your donations keep this blog running and motivate me to create
65-
more content.
66-
</Text>
67-
<List my={4}>
68-
<ListItem>
69-
<ListIcon as={CheckCircleIcon} color={'green.500'} />
70-
You will be added to the list of supporters.
71-
</ListItem>
72-
</List>
73-
<Text as={'i'} fontSize={'sm'}>
74-
If you don&apos;t want to use this widget, you can donate via my{' '}
75-
<Link href={siteConfig.urls.kofi} color={'brand.50'} isExternal>
76-
ko-fi page
77-
</Link>
78-
.
79-
</Text>
80-
</Box>
81-
</SimpleGrid>
63+
<Box>
64+
<Heading size={'md'}>Donate</Heading>
65+
<Text my={4}>
66+
Your donations keep this blog running and motivate me to create
67+
more content.
68+
</Text>
69+
<List my={4}>
70+
<ListItem>
71+
<ListIcon as={CheckCircleIcon} color={'green.500'} />
72+
You will be added to the list of supporters.
73+
</ListItem>
74+
</List>
75+
<Text as={'i'} fontSize={'sm'}>
76+
If you don&apos;t want to use this widget, you can donate via my{' '}
77+
<Link href={siteConfig.urls.kofi} color={'brand.50'} isExternal>
78+
ko-fi page
79+
</Link>
80+
.
81+
</Text>
82+
</Box>
83+
</SimpleGrid>
84+
</Box>
8285
</Box>
83-
</Box>
86+
<Center>
87+
<Box my={20}>
88+
<AdSense
89+
style={{ display: 'block' }}
90+
adFormat={'fluid'}
91+
adSlot={'3408517885'}
92+
data-ad-layout-key={'-f9+52+6z-e1+5b'}
93+
/>
94+
</Box>
95+
</Center>
96+
</>
8497
);
8598
};
8699

0 commit comments

Comments
 (0)