Skip to content

Commit

Permalink
Merge branch 'main' of github.com:TrustlessComputer/bvm-website
Browse files Browse the repository at this point in the history
  • Loading branch information
camewell071 committed Jan 31, 2024
2 parents 367a2ef + d9af3fe commit c570235
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 241 deletions.
13 changes: 11 additions & 2 deletions src/Providers/StoreProvider/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
'use client';

import { AppStore, store } from '@/stores';
import AppLoading from '@/components/AppLoading';
import { AppStore, persistor, store } from '@/stores';
import { Center } from '@chakra-ui/react';
import React, { useRef } from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';

// import useBootstrapApp from '@/hooks/useBootstrapApp';

Expand All @@ -18,5 +21,11 @@ export default function StoreProvider({
storeRef.current = store;
}

return <Provider store={storeRef.current as any}>{children}</Provider>;
return (
<Provider store={storeRef.current as any}>
<PersistGate loading={<></>} persistor={persistor}>
{children}
</PersistGate>
</Provider>
);
}
119 changes: 0 additions & 119 deletions src/modules/airdrop/Section_2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,125 +105,6 @@ const Section_2 = () => {
}
};

const renderItem = (item: IContent, index: number) => {
return (
<Flex
key={`${item.key} ${index}`}
align={'left'}
flexDir={'column'}
w={'100%'}
gap={['20px', '12px']}
>
{/* Date */}
<Text
fontSize={['14px', '16px']}
lineHeight={'22px'}
fontWeight={500}
opacity={0.7}
color={'#353A4D'}
textTransform={'uppercase'}
>
{item.dateStr}
</Text>

{/* Content */}
<Flex
flexDir={{
base: 'column',
'2xl': 'row',
}}
gap={['30px', '36px']}
>
{/* ThumbImg */}
<Image
src={`${item.thumbImgPath}`}
fit={'cover'}
maxW={'322px'}
maxH={'244px'}
/>

{/* Right - Content */}
<Flex
flexDir={'column'}
justify={'center'}
py={['10px', '12px']}
mr={{
base: 0,
'2xl': '160px',
}}
gap={['24px']}
>
<Flex flexDir={'row'} align={'center'} gap={['12px', '16px']}>
{item.twitterLink && (
<Flex flexDir={'row'} align={'center'} gap={'8px'}>
<Image src={`${item.iconPath}`} fit={'contain'} />
<Link
target="_blank"
fontSize={['13px', '14px']}
lineHeight={'19px'}
fontWeight={400}
color={'#000'}
href={item.twitterLink}
>
{item.appName}
</Link>
</Flex>
)}

<Flex flexDir={'row'} align={'center'} gap={'8px'}>
<Image src={`${item.linkIconPath}`} fit={'contain'} />
<Link
target="_blank"
fontSize={['13px', '14px']}
lineHeight={'19px'}
fontWeight={400}
color={'#000'}
href={item.href}
>
{item.linkShortName}
</Link>
</Flex>
</Flex>

<Flex flexDir={'column'} align={'left'} gap={'8px'}>
<Text
fontSize={['20px', '24px']}
lineHeight={['28px', '33px']}
fontWeight={400}
color={'#000'}
>
{item.title}
</Text>

<Text
fontSize={['16px', '18px']}
lineHeight={['20px', '26px']}
fontWeight={400}
color={'#000'}
opacity={0.7}
>
{item.desc}
</Text>
</Flex>

<Flex flexDir={'column'} align={'left'} gap={'8px'}>
<Button
className={s.btnClaim}
w="fit-content"
minW={{
base: '322px',
}}
onClick={() => onClickClaim(item.type)}
>
Claim
</Button>
</Flex>
</Flex>
</Flex>
</Flex>
);
};

return (
<Flex
display={'flex'}
Expand Down
Loading

0 comments on commit c570235

Please sign in to comment.