Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
GitHub as Provider for panel support
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkuki committed Jun 19, 2019
1 parent 624be47 commit 2400795
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
16 changes: 16 additions & 0 deletions src/components/icons/fc-logo-github.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// THIS FILE IS AUTOGENERATED, DO NOT MODIFY MANUALLY
/* tslint:disable */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License. v. 2.0. If a copy of the MPL was not distributed with this file.
* You can obtain one at http://mozilla.org/MPL/2.0/. */
import * as React from 'react'
import GenerateComponentForGraphic from './template'
// Direct access to SVG
export const Graphic = (
<svg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>
<path d='M16 2.5C8.268 2.5 2 8.689 2 16.324c0 6.106 4.01 11.287 9.575 13.115.7.127.956-.3.956-.667 0-.327-.013-1.197-.02-2.35-3.893.835-4.715-1.853-4.715-1.853-.637-1.597-1.555-2.022-1.555-2.022-1.27-.858.097-.84.097-.84 1.405.098 2.144 1.424 2.144 1.424 1.249 2.112 3.276 1.502 4.074 1.15.127-.894.488-1.504.889-1.85-3.109-.348-6.377-1.534-6.377-6.83 0-1.51.546-2.743 1.441-3.71-.144-.35-.625-1.755.137-3.658 0 0 1.176-.372 3.85 1.417a13.57 13.57 0 0 1 3.505-.466 13.59 13.59 0 0 1 3.505.466c2.672-1.789 3.846-1.417 3.846-1.417.764 1.903.283 3.308.139 3.658.897.967 1.44 2.2 1.44 3.71 0 5.31-3.274 6.478-6.393 6.82.503.427.95 1.27.95 2.56 0 1.847-.017 3.338-.017 3.791 0 .37.252.8.963.666C25.992 27.606 30 22.428 30 16.324 30 8.689 23.731 2.5 16 2.5'
fill='#181717' fillRule='evenodd' />
</svg>
)
// Styled Component for SVG
export default GenerateComponentForGraphic(Graphic)
1 change: 1 addition & 0 deletions src/components/icons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export { default as RewardsSendTipsIcon } from './fc-rewards-send-tips'
export { default as TorLockIcon } from './tor-lock'
export { default as TwitchColorIcon } from './fc-logo-twitch'
export { default as TwitterColorIcon } from './fc-logo-twitter'
export { default as GitHubColorIcon } from './fc-logo-github'
export { default as UpholdColorIcon } from './fc-logo-uphold'
export { default as VimeoColorIcon } from './fc-logo-vimeo'
export { default as YoutubeColorIcon } from './fc-logo-youtube'
Expand Down
5 changes: 4 additions & 1 deletion src/features/rewards/profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
import { getLocale } from '../../../helpers'
import { VerifiedSIcon, UnVerifiedSIcon, LoaderIcon, CheckmarkCircleS } from '../../../components/icons'

export type Provider = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo'
export type Provider = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo' | 'github'

export interface Props {
id?: string
Expand All @@ -57,6 +57,7 @@ export default class Profile extends React.PureComponent<Props, {}> {
}

getProviderName (provider: Provider) {
console.log('here')
switch (provider) {
case 'youtube':
return `${getLocale('on')} YouTube`
Expand All @@ -68,6 +69,8 @@ export default class Profile extends React.PureComponent<Props, {}> {
return `${getLocale('on')} Reddit`
case 'vimeo':
return `${getLocale('on')} Vimeo`
case 'github':
return `${getLocale('on')} GitHub`
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/features/rewards/siteBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {
} from '../../../components/icons'

export type Social = { type: SocialType, url: string }
export type SocialType = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo'
export type SocialType = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo' | 'github'
export type Donation = { tokens: string, converted: string, selected?: boolean }

export interface Props {
Expand Down Expand Up @@ -113,6 +113,7 @@ export default class SiteBanner extends React.PureComponent<Props, State> {
case 'twitch':
logo = <TwitchColorIcon />
break
case 'github':
case 'reddit':
logo = <RedditColorIcon />
break
Expand Down Expand Up @@ -165,6 +166,8 @@ export default class SiteBanner extends React.PureComponent<Props, State> {
return `${identifier} ${getLocale('on')} Reddit`
case 'vimeo':
return `${identifier} ${getLocale('on')} Vimeo`
case 'github':
return `${identifier} ${getLocale('on')} GitHub`
default:
return identifier
}
Expand Down
5 changes: 4 additions & 1 deletion src/features/rewards/toggleTips/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from './style'
import {
RedditColorIcon,
GitHubColorIcon,
ThumbsUpIcon,
TwitchColorIcon,
TwitterColorIcon,
Expand All @@ -26,7 +27,7 @@ import {
} from '../../../components/icons'
import { Toggle } from '../../../components'

export type Provider = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo'
export type Provider = 'twitter' | 'youtube' | 'twitch' | 'reddit' | 'vimeo' | 'github'

export interface Props {
id?: string
Expand All @@ -48,6 +49,8 @@ export default class ToggleTips extends React.PureComponent<Props, {}> {
return <RedditColorIcon />
case 'vimeo':
return <VimeoColorIcon />
case 'github':
return <GitHubColorIcon />
}
}

Expand Down

0 comments on commit 2400795

Please sign in to comment.