Skip to content

Commit

Permalink
Merge pull request #241 from edenia/feat/homepage
Browse files Browse the repository at this point in the history
feat(pages): changed tweets components
  • Loading branch information
xavier506 authored Dec 23, 2022
2 parents b2de42f + c59da08 commit 431d4fb
Show file tree
Hide file tree
Showing 4 changed files with 491 additions and 441 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"react-router-dom": "^6.4.2",
"react-swipeable-views": "^0.14.0",
"react-swipeable-views-utils": "^0.14.0",
"react-twitter-widgets": "^1.11.0",
"react-tweet-embed": "^2.0.0",
"sharp": "^0.29.3",
"subscriptions-transport-ws": "^0.11.0",
"ual-anchor": "^1.3.0",
Expand Down
52 changes: 48 additions & 4 deletions src/components/Home/Bottom/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,67 @@
import { Tweet } from 'react-twitter-widgets'
import TweetEmbed from 'react-tweet-embed'
import { useRouter } from 'next/router'
import clsx from 'clsx'

import useStyles from './styles'

const Bottom: React.FC = () => {
const classes = useStyles()
const router = useRouter()

return (
<div className={classes.containerBottom}>
<div className={clsx(classes.wrapperGrid, classes.twitter)}>
<div className={classes.gridRow}>
<div className={classes.gridItem}>
<Tweet tweetId='1606318293270372352' />
<TweetEmbed
tweetId='1606301335141220352'
placeholder={'loading'}
options={{
cards: 'hidden',
conversation: 'none',
lang: `${router?.locale !== 'cn' ? router?.locale : 'zh-cn'}`
}}
/>
</div>
<div className={classes.gridItem}>
<Tweet tweetId='1606301335141220352' />
<TweetEmbed
tweetId='1606318293270372352'
options={{
cards: 'hidden',
conversation: 'none',
lang: `${router?.locale !== 'cn' ? router?.locale : 'zh-cn'}`
}}
/>
</div>
<div className={classes.gridItem}>
<TweetEmbed
tweetId='1606091927300046850'
options={{
cards: 'hidden',
conversation: 'none',
lang: `${router?.locale !== 'cn' ? router?.locale : 'zh-cn'}`
}}
/>
</div>
<div className={classes.gridItem}>
<TweetEmbed
tweetId='1578776363435032577'
options={{
cards: 'hidden',
conversation: 'none',
lang: `${router?.locale !== 'cn' ? router?.locale : 'zh-cn'}`
}}
/>
</div>
<div className={classes.gridItem} id='cardBox1'>
<Tweet tweetId='1606324710446243846' />
<TweetEmbed
tweetId='1516036449698664452'
options={{
cards: 'hidden',
conversation: 'none',
lang: `${router?.locale !== 'cn' ? router?.locale : 'zh-cn'}`
}}
/>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/Bottom/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Styles = makeStyles(theme => ({
width: '90%'
},
[theme.breakpoints.up('md')]: {
width: '75%'
width: '95%'
}
},
gridRow: {
Expand Down
Loading

0 comments on commit 431d4fb

Please sign in to comment.