Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
James Pearson committed Oct 3, 2019
1 parent e45fd50 commit db00016
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
26 changes: 13 additions & 13 deletions App/Screens/Home/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,32 @@ import * as theme from '../../../util/theme';

interface FooterProps extends NavigationInjectedProps, ViewProps { }

export function Footer(props: FooterProps) {
export function Footer (props: FooterProps) {
const { api } = useContext(ApiContext)!;
const { currentLocation } = useContext(CurrentLocationContext);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { navigation, style, ...rest } = props;

const isTooFar = isStationTooFar(currentLocation!, api!);

function goToAbout() {
function goToAbout () {
track('HOME_SCREEN_ABOUT_CLICK');
navigation.navigate('About');
}

function goToAboutWhySoFar() {
function goToAboutWhySoFar () {
track('HOME_SCREEN_ABOUT_WHY_SO_FAR_CLICK');
navigation.navigate('About', {
scrollInto: aboutSections.aboutWhyIsTheStationSoFarTitle
});
}

function goToDetails() {
function goToDetails () {
track('HOME_SCREEN_DETAILS_CLICK');
navigation.navigate('Details');
}

function handleShare() {
function handleShare () {
track('HOME_SCREEN_SHARE_CLICK');

// Share doesn't currently support images on Android, so the text version
Expand All @@ -75,10 +75,10 @@ export function Footer(props: FooterProps) {
{i18n.t('home_btn_why_is_station_so_far').toUpperCase()}
</Button>
) : (
<Button onPress={goToDetails}>
{i18n.t('home_btn_see_detailed_info').toUpperCase()}
</Button>
);
<Button onPress={goToDetails}>
{i18n.t('home_btn_see_detailed_info').toUpperCase()}
</Button>
);
};

const renderSmallButtons = () => {
Expand All @@ -89,10 +89,10 @@ export function Footer(props: FooterProps) {
{i18n.t('home_btn_more_details').toUpperCase()}
</Button>
) : (
<Button icon="question-circle" onPress={goToAbout} type="secondary">
{i18n.t('home_btn_faq_about').toUpperCase()}
</Button>
)}
<Button icon="question-circle" onPress={goToAbout} type="secondary">
{i18n.t('home_btn_faq_about').toUpperCase()}
</Button>
)}
<Button icon="share-alt" onPress={handleShare} type="secondary">
{i18n.t('home_btn_share').toUpperCase()}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion App/Screens/ShareScreen/ShareScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import * as theme from '../../util/theme';

interface ShareScreenProps extends NavigationInjectedProps { }

export function ShareScreen(props: ShareScreenProps) {
export function ShareScreen (props: ShareScreenProps) {
const refViewShot = createRef();

useEffect(() => {
Expand Down
1 change: 0 additions & 1 deletion App/components/CigaretteBlock/CigaretteBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export function CigaretteBlock (props: CigaretteBlockProps) {
cigarettes
});

console.log('text :', text);
const [firstPartText, secondPartText] = text.split('<');

const frequencyText = displayFrequency ? (<Text>{i18n.t(`frequency_${frequency}`)}</Text>) : null;
Expand Down

0 comments on commit db00016

Please sign in to comment.