-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: fix typo * feat: update tweet item, change pagination, fix missing image placehoders --------- Co-authored-by: Расул <[email protected]>
- Loading branch information
Showing
17 changed files
with
369 additions
and
168 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/components/App/SideBar/Relevance/Episode/TypePerson/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import styled from 'styled-components' | ||
import { Avatar } from '~/components/common/Avatar' | ||
import { Flex } from '~/components/common/Flex' | ||
import { colors } from '~/utils/colors' | ||
|
||
type Props = { | ||
title: string | ||
imageUrl?: string | ||
name: string | ||
} | ||
|
||
export const TypePerson = ({ title, imageUrl, name }: Props) => ( | ||
<Flex> | ||
<PictureWrapper> | ||
<Avatar rounded size={64} src={imageUrl || ''} type="person" /> | ||
</PictureWrapper> | ||
{(title || name) && <Name>{title || name}</Name>} | ||
</Flex> | ||
) | ||
|
||
const PictureWrapper = styled(Flex)` | ||
img { | ||
width: 64px; | ||
height: 64px | ||
border-radius: 50%; | ||
object-fit: cover; | ||
} | ||
margin-right: 16px; | ||
` | ||
|
||
const Name = styled(Flex)` | ||
color: ${colors.white}; | ||
font-family: Barlow; | ||
font-size: 13px; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 17px; | ||
` |
91 changes: 91 additions & 0 deletions
91
src/components/App/SideBar/Relevance/Episode/TypeTweet/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import moment from 'moment' | ||
import styled from 'styled-components' | ||
import { Avatar } from '~/components/common/Avatar' | ||
import { Flex } from '~/components/common/Flex' | ||
import { colors } from '~/utils/colors' | ||
import { Date } from '..' | ||
|
||
type Props = { | ||
text: string | ||
imageUrl?: string | ||
twitterHandle?: string | ||
date: number | ||
name: string | ||
verified: boolean | ||
} | ||
|
||
export const TypeTweet = ({ text, imageUrl, date, twitterHandle, name, verified }: Props) => ( | ||
<Flex direction="column"> | ||
<Flex align="center" direction="row" pr={16}> | ||
<PictureWrapper> | ||
<Avatar rounded size={27} src={imageUrl || ''} type="person" /> | ||
</PictureWrapper> | ||
<Flex> | ||
<Name align="center" direction="row"> | ||
{name} | ||
{verified && ( | ||
<div className="verification"> | ||
<img alt="verified" src="verified_twitter.svg" /> | ||
</div> | ||
)} | ||
</Name> | ||
{twitterHandle && <TwitterHandle>@{twitterHandle}</TwitterHandle>} | ||
</Flex> | ||
</Flex> | ||
|
||
<Flex grow={1} shrink={1}> | ||
<TwitText data-testid="episode-description">{text}</TwitText> | ||
<Flex direction="row" justify="flex-start"> | ||
{Boolean(date) && <Date>{moment.unix(date).format('ll')}</Date>} | ||
</Flex> | ||
</Flex> | ||
</Flex> | ||
) | ||
|
||
const PictureWrapper = styled(Flex)` | ||
img { | ||
width: 64px; | ||
height: 64px | ||
border-radius: 50%; | ||
object-fit: cover; | ||
} | ||
margin-right: 16px; | ||
` | ||
|
||
const Name = styled(Flex)` | ||
color: ${colors.white}; | ||
font-family: Barlow; | ||
font-size: 11px; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: normal; | ||
letter-spacing: -0.22px; | ||
.verification { | ||
margin-left: 4px; | ||
} | ||
` | ||
|
||
const TwitterHandle = styled(Flex)` | ||
color: ${colors.GRAY7}; | ||
font-family: Barlow; | ||
font-size: 9px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: normal; | ||
` | ||
|
||
const TwitText = styled(Flex)` | ||
color: ${colors.white}; | ||
font-family: Barlow; | ||
font-size: 13px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 130%; | ||
letter-spacing: -0.39px; | ||
margin: 8px 0; | ||
display: -webkit-box; | ||
-webkit-line-clamp: 2; /* Limit to two lines */ | ||
-webkit-box-orient: vertical; | ||
overflow: hidden; | ||
white-space: normal; | ||
` |
Oops, something went wrong.