youtube link with id on profile

This commit is contained in:
Sendou
2020-06-06 12:32:45 +03:00
parent 7406dc18ae
commit 63eea90192
3 changed files with 4 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ const AvatarWithInfo: React.FC<AvatarWithInfoProps> = ({ user, canEdit }) => {
</a>
</Flex>
)}
{user.youtube_name && (
{user.youtube_name && user.youtube_id && (
<Flex
alignItems="center"
mx="0.5em"
@@ -94,7 +94,7 @@ const AvatarWithInfo: React.FC<AvatarWithInfoProps> = ({ user, canEdit }) => {
color={grayWithShade}
>
<Box as={FaYoutube} mr="0.2em" />
<a href={`https://youtube.com/c/${user.youtube_name}`}>
<a href={`https://youtube.com/channel/${user.youtube_id}`}>
{user.youtube_name}
</a>
</Flex>

View File

@@ -20,6 +20,7 @@ export const SEARCH_FOR_USER: DocumentNode = gql`
twitch_name
twitter_name
youtube_name
youtube_id
country
weapons
top500

View File

@@ -110,6 +110,7 @@ export interface User {
twitch_name?: string
twitter_name?: string
youtube_name?: string
youtube_id?: string
country?: CountryCode
weapons?: Weapon[]
top500: boolean