Skip to content

Commit f6cd40b

Browse files
committed
Lint
1 parent 0bac8f9 commit f6cd40b

File tree

3 files changed

+45
-46
lines changed

3 files changed

+45
-46
lines changed

api/lunch.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Lunch, RawLunch } from '../types'
33
import * as constants from '../constants/Lunch'
44
import moment from 'moment'
55

6-
function formatType(type: string): string {
6+
function formatType (type: string): string {
77
if (type.includes('vegaani')) {
88
return 'vegan'
99
} else if (type.includes('tiedoitus')) {
@@ -47,7 +47,7 @@ async function fetchRestaurant (name: string, id: number): Promise<Lunch> {
4747
}
4848

4949
const date = parsed.rss.channel[0].item[day - 1].title[0]
50-
let menu = parsed.rss.channel[0].item[day - 1].description[0]
50+
const menu = parsed.rss.channel[0].item[day - 1].description[0]
5151
.split('. ')
5252
.filter(item => item)
5353
.map(item => {
@@ -78,8 +78,7 @@ async function fetchRestaurant (name: string, id: number): Promise<Lunch> {
7878
}
7979
}
8080
index++
81-
}
82-
81+
}
8382

8483
return {
8584
title: name,

constants/Lunch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ const allergens = {
2121
'kananmunaa': 'ägg',
2222
'siemeniä': 'frön',
2323
'maitoa': 'mjölk',
24-
'soijaa': 'soja',
25-
'kalaa': 'fisk',
24+
'soijaa': 'soja',
25+
'kalaa': 'fisk'
2626
}
2727

2828
export {
2929
days,
3030
allergens
31-
}
31+
}

screens/Lunch/LunchScreen.tsx

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,45 @@ function LunchScreen ({ theme }) {
4646

4747
function FormattedMenu ({ lunch }) {
4848
switch (lunch.type) {
49-
case 'info':
50-
return <FormattedLunch
51-
lunch={lunch}
52-
name={'info-outline'}
53-
type={'materialicons'}
54-
bold={false}
55-
/>
56-
case 'lunch':
57-
return <FormattedLunch
58-
lunch={lunch}
59-
name={'restaurant-menu'}
60-
type={'ionicons'}
61-
bold={true}
62-
/>
63-
case 'dessert':
64-
return <FormattedLunch
65-
lunch={lunch}
66-
name={'cupcake'}
67-
type={'material-community'}
68-
bold={true}
69-
/>
70-
case 'vegan':
71-
return <FormattedLunch
72-
lunch={lunch}
73-
name={'leaf'}
74-
type={'entypo'}
75-
bold={true}
76-
/>
77-
case 'special':
78-
return <FormattedLunch
79-
lunch={lunch}
80-
name={'credit'}
81-
type={'entypo'}
82-
bold={true}
83-
/>
84-
case 'allergens':
85-
return <Text style={{ paddingLeft: 24 }}>
86-
{lunch.content}
87-
</Text>
49+
case 'info':
50+
return <FormattedLunch
51+
lunch={lunch}
52+
name={'info-outline'}
53+
type={'materialicons'}
54+
bold={false}
55+
/>
56+
case 'lunch':
57+
return <FormattedLunch
58+
lunch={lunch}
59+
name={'restaurant-menu'}
60+
type={'ionicons'}
61+
bold={true}
62+
/>
63+
case 'dessert':
64+
return <FormattedLunch
65+
lunch={lunch}
66+
name={'cupcake'}
67+
type={'material-community'}
68+
bold={true}
69+
/>
70+
case 'vegan':
71+
return <FormattedLunch
72+
lunch={lunch}
73+
name={'leaf'}
74+
type={'entypo'}
75+
bold={true}
76+
/>
77+
case 'special':
78+
return <FormattedLunch
79+
lunch={lunch}
80+
name={'credit'}
81+
type={'entypo'}
82+
bold={true}
83+
/>
84+
case 'allergens':
85+
return <Text style={{ paddingLeft: 24 }}>
86+
{lunch.content}
87+
</Text>
8888
}
8989
}
9090

0 commit comments

Comments
 (0)