Repository: kiwicom/mobile
Pull request #1066 (2018-09-04 09:37:19)

Shared: refactor Duration component to shared package


Patch:
diff --git a/app/MMB/src/__generated__/MainMenuContainerQuery.graphql.js b/app/MMB/src/__generated__/MainMenuContainerQuery.graphql.js
index ab4d66dc..a52a6695 100644
--- a/app/MMB/src/__generated__/MainMenuContainerQuery.graphql.js
+++ b/app/MMB/src/__generated__/MainMenuContainerQuery.graphql.js
@@ -1,6 +1,6 @@
 /**
  * @flow
- * @relayHash b0520e8b71e814b33a27b7dc528090c4
+ * @relayHash 6f30100d9356386d0d94c309964bc149
  */
 
 /* eslint-disable */
@@ -220,7 +220,7 @@ fragment Timeline on Trip {
 
 fragment TripTitle on Trip {
   ...MulticityTitle
-  ...Duration
+  duration
 }
 
 fragment TimelineTrip on Trip {
@@ -298,10 +298,6 @@ fragment MulticityTitle on Trip {
   }
 }
 
-fragment Duration on Trip {
-  duration
-}
-
 fragment MulticityName on RouteStop {
   airport {
     city {
@@ -345,7 +341,7 @@ fragment TripCities on Trip {
 }
 
 fragment TripTimes on Trip {
-  ...Duration
+  duration
   departure {
     ...DateTime
   }
@@ -677,7 +673,7 @@ return {
   "operationKind": "query",
   "name": "MainMenuContainerQuery",
   "id": null,
-  "text": "query MainMenuContainerQuery(\n  $bookingId: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $bookingId, authToken: $authToken) {\n    __typename\n    ...MainMenu\n    id\n  }\n}\n\nfragment MainMenu on BookingInterface {\n  databaseId\n  authToken\n  isPastBooking\n  ...Header\n  ...PassengerMenuGroup\n  ...MissingInformation\n  ...FlightServices\n}\n\nfragment Header on BookingInterface {\n  isPastBooking\n  ...StatusBar\n  ...TripInfo\n  ...TripOverview\n}\n\nfragment PassengerMenuGroup on BookingInterface {\n  ...PassengerMenuDetail\n}\n\nfragment MissingInformation on BookingInterface {\n  passengers {\n    travelDocument {\n      idNumber\n    }\n  }\n}\n\nfragment FlightServices on BookingInterface {\n  __typename\n  isPastBooking\n  ...FlightServicesOneWay\n  ...FlightServicesReturn\n  ...FlightServicesMulticity\n}\n\nfragment FlightServicesOneWay on BookingInterface {\n  ... on BookingOneWay {\n    trip {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesReturn on BookingInterface {\n  ... on BookingReturn {\n    inbound {\n      ...FlightServicesMenuItem\n    }\n    outbound {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesMulticity on BookingInterface {\n  ... on BookingMulticity {\n    trips {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesMenuItem on Trip {\n  legs {\n    type\n    id\n  }\n}\n\nfragment PassengerMenuDetail on BookingInterface {\n  ...Visa\n  passengers {\n    databaseId\n    ...Passenger\n  }\n}\n\nfragment Visa on BookingInterface {\n  passengers {\n    visaInformation {\n      requiredIn {\n        name\n        id\n      }\n      warningIn {\n        name\n        id\n      }\n    }\n  }\n}\n\nfragment Passenger on Passenger {\n  fullName\n  title\n  birthday\n}\n\nfragment StatusBar on BookingInterface {\n  ...StatusBarIcon\n  databaseId\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment TripOverview on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...OneWayTimeline\n  }\n  ... on BookingReturn {\n    ...ReturnTimeline\n  }\n  ... on BookingMulticity {\n    ...MulticityTimeline\n  }\n}\n\nfragment OneWayTimeline on BookingOneWay {\n  trip {\n    ...Timeline\n  }\n}\n\nfragment ReturnTimeline on BookingReturn {\n  outbound {\n    ...Timeline\n  }\n  inbound {\n    ...Timeline\n  }\n}\n\nfragment MulticityTimeline on BookingMulticity {\n  trips {\n    ...Timeline\n  }\n}\n\nfragment Timeline on Trip {\n  ...TripTitle\n  departure {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  arrival {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  legs {\n    id\n  }\n  ...TimelineTrip\n}\n\nfragment TripTitle on Trip {\n  ...MulticityTitle\n  ...Duration\n}\n\nfragment TimelineTrip on Trip {\n  legs {\n    departure {\n      ...TimelineDeparture_routeStop\n    }\n    arrival {\n      ...TimelineArrival\n      ...TimelineDeparture_arrival\n    }\n    ...TimelineDeparture_legInfo\n    id\n  }\n}\n\nfragment TimelineDeparture_routeStop on RouteStop {\n  ...TimelineTitle\n  ...TimelineTerminal\n}\n\nfragment TimelineArrival on RouteStop {\n  ...TimelineTitle\n}\n\nfragment TimelineDeparture_arrival on RouteStop {\n  ...TimelineTerminal\n}\n\nfragment TimelineDeparture_legInfo on Leg {\n  flightNumber\n  operatingAirline {\n    name\n    iata\n  }\n  airline {\n    name\n    logoUrl\n    code\n  }\n  vehicle {\n    model\n    manufacturer\n  }\n}\n\nfragment TimelineTerminal on RouteStop {\n  terminal\n  airport {\n    code\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TimelineTitle on RouteStop {\n  localTime\n  airport {\n    locationId\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment MulticityTitle on Trip {\n  departure {\n    ...MulticityName\n  }\n  arrival {\n    ...MulticityName\n  }\n}\n\nfragment Duration on Trip {\n  duration\n}\n\nfragment MulticityName on RouteStop {\n  airport {\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  ...Duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n\nfragment StatusBarIcon on BookingInterface {\n  status\n  isPastBooking\n}\n",
+  "text": "query MainMenuContainerQuery(\n  $bookingId: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $bookingId, authToken: $authToken) {\n    __typename\n    ...MainMenu\n    id\n  }\n}\n\nfragment MainMenu on BookingInterface {\n  databaseId\n  authToken\n  isPastBooking\n  ...Header\n  ...PassengerMenuGroup\n  ...MissingInformation\n  ...FlightServices\n}\n\nfragment Header on BookingInterface {\n  isPastBooking\n  ...StatusBar\n  ...TripInfo\n  ...TripOverview\n}\n\nfragment PassengerMenuGroup on BookingInterface {\n  ...PassengerMenuDetail\n}\n\nfragment MissingInformation on BookingInterface {\n  passengers {\n    travelDocument {\n      idNumber\n    }\n  }\n}\n\nfragment FlightServices on BookingInterface {\n  __typename\n  isPastBooking\n  ...FlightServicesOneWay\n  ...FlightServicesReturn\n  ...FlightServicesMulticity\n}\n\nfragment FlightServicesOneWay on BookingInterface {\n  ... on BookingOneWay {\n    trip {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesReturn on BookingInterface {\n  ... on BookingReturn {\n    inbound {\n      ...FlightServicesMenuItem\n    }\n    outbound {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesMulticity on BookingInterface {\n  ... on BookingMulticity {\n    trips {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesMenuItem on Trip {\n  legs {\n    type\n    id\n  }\n}\n\nfragment PassengerMenuDetail on BookingInterface {\n  ...Visa\n  passengers {\n    databaseId\n    ...Passenger\n  }\n}\n\nfragment Visa on BookingInterface {\n  passengers {\n    visaInformation {\n      requiredIn {\n        name\n        id\n      }\n      warningIn {\n        name\n        id\n      }\n    }\n  }\n}\n\nfragment Passenger on Passenger {\n  fullName\n  title\n  birthday\n}\n\nfragment StatusBar on BookingInterface {\n  ...StatusBarIcon\n  databaseId\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment TripOverview on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...OneWayTimeline\n  }\n  ... on BookingReturn {\n    ...ReturnTimeline\n  }\n  ... on BookingMulticity {\n    ...MulticityTimeline\n  }\n}\n\nfragment OneWayTimeline on BookingOneWay {\n  trip {\n    ...Timeline\n  }\n}\n\nfragment ReturnTimeline on BookingReturn {\n  outbound {\n    ...Timeline\n  }\n  inbound {\n    ...Timeline\n  }\n}\n\nfragment MulticityTimeline on BookingMulticity {\n  trips {\n    ...Timeline\n  }\n}\n\nfragment Timeline on Trip {\n  ...TripTitle\n  departure {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  arrival {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  legs {\n    id\n  }\n  ...TimelineTrip\n}\n\nfragment TripTitle on Trip {\n  ...MulticityTitle\n  duration\n}\n\nfragment TimelineTrip on Trip {\n  legs {\n    departure {\n      ...TimelineDeparture_routeStop\n    }\n    arrival {\n      ...TimelineArrival\n      ...TimelineDeparture_arrival\n    }\n    ...TimelineDeparture_legInfo\n    id\n  }\n}\n\nfragment TimelineDeparture_routeStop on RouteStop {\n  ...TimelineTitle\n  ...TimelineTerminal\n}\n\nfragment TimelineArrival on RouteStop {\n  ...TimelineTitle\n}\n\nfragment TimelineDeparture_arrival on RouteStop {\n  ...TimelineTerminal\n}\n\nfragment TimelineDeparture_legInfo on Leg {\n  flightNumber\n  operatingAirline {\n    name\n    iata\n  }\n  airline {\n    name\n    logoUrl\n    code\n  }\n  vehicle {\n    model\n    manufacturer\n  }\n}\n\nfragment TimelineTerminal on RouteStop {\n  terminal\n  airport {\n    code\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TimelineTitle on RouteStop {\n  localTime\n  airport {\n    locationId\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment MulticityTitle on Trip {\n  departure {\n    ...MulticityName\n  }\n  arrival {\n    ...MulticityName\n  }\n}\n\nfragment MulticityName on RouteStop {\n  airport {\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n\nfragment StatusBarIcon on BookingInterface {\n  status\n  isPastBooking\n}\n",
   "metadata": {},
   "fragment": {
     "kind": "Fragment",
diff --git a/app/MMB/src/__generated__/MainMenuRefetchQuery.graphql.js b/app/MMB/src/__generated__/MainMenuRefetchQuery.graphql.js
index 6e8336bb..954dfac0 100644
--- a/app/MMB/src/__generated__/MainMenuRefetchQuery.graphql.js
+++ b/app/MMB/src/__generated__/MainMenuRefetchQuery.graphql.js
@@ -1,6 +1,6 @@
 /**
  * @flow
- * @relayHash 334eb6f24547ce98c4decdb2c55ca487
+ * @relayHash 920cdcbab4b5cab4a4e01bd8ea9c4a76
  */
 
 /* eslint-disable */
@@ -220,7 +220,7 @@ fragment Timeline on Trip {
 
 fragment TripTitle on Trip {
   ...MulticityTitle
-  ...Duration
+  duration
 }
 
 fragment TimelineTrip on Trip {
@@ -298,10 +298,6 @@ fragment MulticityTitle on Trip {
   }
 }
 
-fragment Duration on Trip {
-  duration
-}
-
 fragment MulticityName on RouteStop {
   airport {
     city {
@@ -345,7 +341,7 @@ fragment TripCities on Trip {
 }
 
 fragment TripTimes on Trip {
-  ...Duration
+  duration
   departure {
     ...DateTime
   }
@@ -677,7 +673,7 @@ return {
   "operationKind": "query",
   "name": "MainMenuRefetchQuery",
   "id": null,
-  "text": "query MainMenuRefetchQuery(\n  $id: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $id, authToken: $authToken) {\n    __typename\n    ...MainMenu\n    id\n  }\n}\n\nfragment MainMenu on BookingInterface {\n  databaseId\n  authToken\n  isPastBooking\n  ...Header\n  ...PassengerMenuGroup\n  ...MissingInformation\n  ...FlightServices\n}\n\nfragment Header on BookingInterface {\n  isPastBooking\n  ...StatusBar\n  ...TripInfo\n  ...TripOverview\n}\n\nfragment PassengerMenuGroup on BookingInterface {\n  ...PassengerMenuDetail\n}\n\nfragment MissingInformation on BookingInterface {\n  passengers {\n    travelDocument {\n      idNumber\n    }\n  }\n}\n\nfragment FlightServices on BookingInterface {\n  __typename\n  isPastBooking\n  ...FlightServicesOneWay\n  ...FlightServicesReturn\n  ...FlightServicesMulticity\n}\n\nfragment FlightServicesOneWay on BookingInterface {\n  ... on BookingOneWay {\n    trip {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesReturn on BookingInterface {\n  ... on BookingReturn {\n    inbound {\n      ...FlightServicesMenuItem\n    }\n    outbound {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesMulticity on BookingInterface {\n  ... on BookingMulticity {\n    trips {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesMenuItem on Trip {\n  legs {\n    type\n    id\n  }\n}\n\nfragment PassengerMenuDetail on BookingInterface {\n  ...Visa\n  passengers {\n    databaseId\n    ...Passenger\n  }\n}\n\nfragment Visa on BookingInterface {\n  passengers {\n    visaInformation {\n      requiredIn {\n        name\n        id\n      }\n      warningIn {\n        name\n        id\n      }\n    }\n  }\n}\n\nfragment Passenger on Passenger {\n  fullName\n  title\n  birthday\n}\n\nfragment StatusBar on BookingInterface {\n  ...StatusBarIcon\n  databaseId\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment TripOverview on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...OneWayTimeline\n  }\n  ... on BookingReturn {\n    ...ReturnTimeline\n  }\n  ... on BookingMulticity {\n    ...MulticityTimeline\n  }\n}\n\nfragment OneWayTimeline on BookingOneWay {\n  trip {\n    ...Timeline\n  }\n}\n\nfragment ReturnTimeline on BookingReturn {\n  outbound {\n    ...Timeline\n  }\n  inbound {\n    ...Timeline\n  }\n}\n\nfragment MulticityTimeline on BookingMulticity {\n  trips {\n    ...Timeline\n  }\n}\n\nfragment Timeline on Trip {\n  ...TripTitle\n  departure {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  arrival {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  legs {\n    id\n  }\n  ...TimelineTrip\n}\n\nfragment TripTitle on Trip {\n  ...MulticityTitle\n  ...Duration\n}\n\nfragment TimelineTrip on Trip {\n  legs {\n    departure {\n      ...TimelineDeparture_routeStop\n    }\n    arrival {\n      ...TimelineArrival\n      ...TimelineDeparture_arrival\n    }\n    ...TimelineDeparture_legInfo\n    id\n  }\n}\n\nfragment TimelineDeparture_routeStop on RouteStop {\n  ...TimelineTitle\n  ...TimelineTerminal\n}\n\nfragment TimelineArrival on RouteStop {\n  ...TimelineTitle\n}\n\nfragment TimelineDeparture_arrival on RouteStop {\n  ...TimelineTerminal\n}\n\nfragment TimelineDeparture_legInfo on Leg {\n  flightNumber\n  operatingAirline {\n    name\n    iata\n  }\n  airline {\n    name\n    logoUrl\n    code\n  }\n  vehicle {\n    model\n    manufacturer\n  }\n}\n\nfragment TimelineTerminal on RouteStop {\n  terminal\n  airport {\n    code\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TimelineTitle on RouteStop {\n  localTime\n  airport {\n    locationId\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment MulticityTitle on Trip {\n  departure {\n    ...MulticityName\n  }\n  arrival {\n    ...MulticityName\n  }\n}\n\nfragment Duration on Trip {\n  duration\n}\n\nfragment MulticityName on RouteStop {\n  airport {\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  ...Duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n\nfragment StatusBarIcon on BookingInterface {\n  status\n  isPastBooking\n}\n",
+  "text": "query MainMenuRefetchQuery(\n  $id: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $id, authToken: $authToken) {\n    __typename\n    ...MainMenu\n    id\n  }\n}\n\nfragment MainMenu on BookingInterface {\n  databaseId\n  authToken\n  isPastBooking\n  ...Header\n  ...PassengerMenuGroup\n  ...MissingInformation\n  ...FlightServices\n}\n\nfragment Header on BookingInterface {\n  isPastBooking\n  ...StatusBar\n  ...TripInfo\n  ...TripOverview\n}\n\nfragment PassengerMenuGroup on BookingInterface {\n  ...PassengerMenuDetail\n}\n\nfragment MissingInformation on BookingInterface {\n  passengers {\n    travelDocument {\n      idNumber\n    }\n  }\n}\n\nfragment FlightServices on BookingInterface {\n  __typename\n  isPastBooking\n  ...FlightServicesOneWay\n  ...FlightServicesReturn\n  ...FlightServicesMulticity\n}\n\nfragment FlightServicesOneWay on BookingInterface {\n  ... on BookingOneWay {\n    trip {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesReturn on BookingInterface {\n  ... on BookingReturn {\n    inbound {\n      ...FlightServicesMenuItem\n    }\n    outbound {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesMulticity on BookingInterface {\n  ... on BookingMulticity {\n    trips {\n      ...FlightServicesMenuItem\n    }\n  }\n}\n\nfragment FlightServicesMenuItem on Trip {\n  legs {\n    type\n    id\n  }\n}\n\nfragment PassengerMenuDetail on BookingInterface {\n  ...Visa\n  passengers {\n    databaseId\n    ...Passenger\n  }\n}\n\nfragment Visa on BookingInterface {\n  passengers {\n    visaInformation {\n      requiredIn {\n        name\n        id\n      }\n      warningIn {\n        name\n        id\n      }\n    }\n  }\n}\n\nfragment Passenger on Passenger {\n  fullName\n  title\n  birthday\n}\n\nfragment StatusBar on BookingInterface {\n  ...StatusBarIcon\n  databaseId\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment TripOverview on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...OneWayTimeline\n  }\n  ... on BookingReturn {\n    ...ReturnTimeline\n  }\n  ... on BookingMulticity {\n    ...MulticityTimeline\n  }\n}\n\nfragment OneWayTimeline on BookingOneWay {\n  trip {\n    ...Timeline\n  }\n}\n\nfragment ReturnTimeline on BookingReturn {\n  outbound {\n    ...Timeline\n  }\n  inbound {\n    ...Timeline\n  }\n}\n\nfragment MulticityTimeline on BookingMulticity {\n  trips {\n    ...Timeline\n  }\n}\n\nfragment Timeline on Trip {\n  ...TripTitle\n  departure {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  arrival {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  legs {\n    id\n  }\n  ...TimelineTrip\n}\n\nfragment TripTitle on Trip {\n  ...MulticityTitle\n  duration\n}\n\nfragment TimelineTrip on Trip {\n  legs {\n    departure {\n      ...TimelineDeparture_routeStop\n    }\n    arrival {\n      ...TimelineArrival\n      ...TimelineDeparture_arrival\n    }\n    ...TimelineDeparture_legInfo\n    id\n  }\n}\n\nfragment TimelineDeparture_routeStop on RouteStop {\n  ...TimelineTitle\n  ...TimelineTerminal\n}\n\nfragment TimelineArrival on RouteStop {\n  ...TimelineTitle\n}\n\nfragment TimelineDeparture_arrival on RouteStop {\n  ...TimelineTerminal\n}\n\nfragment TimelineDeparture_legInfo on Leg {\n  flightNumber\n  operatingAirline {\n    name\n    iata\n  }\n  airline {\n    name\n    logoUrl\n    code\n  }\n  vehicle {\n    model\n    manufacturer\n  }\n}\n\nfragment TimelineTerminal on RouteStop {\n  terminal\n  airport {\n    code\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TimelineTitle on RouteStop {\n  localTime\n  airport {\n    locationId\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment MulticityTitle on Trip {\n  departure {\n    ...MulticityName\n  }\n  arrival {\n    ...MulticityName\n  }\n}\n\nfragment MulticityName on RouteStop {\n  airport {\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n\nfragment StatusBarIcon on BookingInterface {\n  status\n  isPastBooking\n}\n",
   "metadata": {},
   "fragment": {
     "kind": "Fragment",
diff --git a/app/MMB/src/components/header/TripTimes.js b/app/MMB/src/components/header/TripTimes.js
index 4ea08ea2..44b133a1 100644
--- a/app/MMB/src/components/header/TripTimes.js
+++ b/app/MMB/src/components/header/TripTimes.js
@@ -3,9 +3,9 @@
 import * as React from 'react';
 import { View } from 'react-native';
 import { graphql, createFragmentContainer } from '@kiwicom/mobile-relay';
-import { StyleSheet } from '@kiwicom/mobile-shared';
+import { StyleSheet, Duration } from '@kiwicom/mobile-shared';
+import idx from 'idx';
 
-import Duration from './Duration';
 import DateTime from './DateTime';
 import type { TripTimes as TripTimesType } from './__generated__/TripTimes.graphql';
 
@@ -24,7 +24,7 @@ function TripTimes({ data }: Props) {
       </View>
 
       <View style={styleSheet.duration}>
-        <Duration data={data} />
+        <Duration duration={idx(data, _ => _.duration)} />
       </View>
 
       <View style={styleSheet.arrival}>
@@ -38,7 +38,7 @@ export default createFragmentContainer(
   TripTimes,
   graphql`
     fragment TripTimes on Trip {
-      ...Duration
+      duration
       departure {
         ...DateTime
       }
diff --git a/app/MMB/src/components/header/__generated__/Duration.graphql.js b/app/MMB/src/components/header/__generated__/Duration.graphql.js
deleted file mode 100644
index 64d8a329..00000000
--- a/app/MMB/src/components/header/__generated__/Duration.graphql.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * @flow
- */
-
-/* eslint-disable */
-
-'use strict';
-
-/*::
-import type { ConcreteFragment } from 'relay-runtime';
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type Duration$ref: FragmentReference;
-export type Duration = {|
-  +duration: ?number,
-  +$refType: Duration$ref,
-|};
-*/
-
-
-const node/*: ConcreteFragment*/ = {
-  "kind": "Fragment",
-  "name": "Duration",
-  "type": "Trip",
-  "metadata": null,
-  "argumentDefinitions": [],
-  "selections": [
-    {
-      "kind": "ScalarField",
-      "alias": null,
-      "name": "duration",
-      "args": null,
-      "storageKey": null
-    }
-  ]
-};
-// prettier-ignore
-(node/*: any*/).hash = '06248197ca4f955ad9e5490f8b322acb';
-module.exports = node;
diff --git a/app/MMB/src/components/header/__generated__/TripTimes.graphql.js b/app/MMB/src/components/header/__generated__/TripTimes.graphql.js
index 3df06566..d1e89ee9 100644
--- a/app/MMB/src/components/header/__generated__/TripTimes.graphql.js
+++ b/app/MMB/src/components/header/__generated__/TripTimes.graphql.js
@@ -9,17 +9,16 @@
 /*::
 import type { ConcreteFragment } from 'relay-runtime';
 type DateTime$ref = any;
-type Duration$ref = any;
 import type { FragmentReference } from "relay-runtime";
 declare export opaque type TripTimes$ref: FragmentReference;
 export type TripTimes = {|
+  +duration: ?number,
   +departure: ?{|
     +$fragmentRefs: DateTime$ref
   |},
   +arrival: ?{|
     +$fragmentRefs: DateTime$ref
   |},
-  +$fragmentRefs: Duration$ref,
   +$refType: TripTimes$ref,
 |};
 */
@@ -41,9 +40,11 @@ return {
   "argumentDefinitions": [],
   "selections": [
     {
-      "kind": "FragmentSpread",
-      "name": "Duration",
-      "args": null
+      "kind": "ScalarField",
+      "alias": null,
+      "name": "duration",
+      "args": null,
+      "storageKey": null
     },
     {
       "kind": "LinkedField",
@@ -69,5 +70,5 @@ return {
 };
 })();
 // prettier-ignore
-(node/*: any*/).hash = '657c08da5284310451246fb983abeb87';
+(node/*: any*/).hash = 'addd15a843b146c780830ad31ad57902';
 module.exports = node;
diff --git a/app/MMB/src/scenes/travelDocument/__generated__/FillTravelDocumentContainerQuery.graphql.js b/app/MMB/src/scenes/travelDocument/__generated__/FillTravelDocumentContainerQuery.graphql.js
index aa7a46d4..5d6c8242 100644
--- a/app/MMB/src/scenes/travelDocument/__generated__/FillTravelDocumentContainerQuery.graphql.js
+++ b/app/MMB/src/scenes/travelDocument/__generated__/FillTravelDocumentContainerQuery.graphql.js
@@ -1,6 +1,6 @@
 /**
  * @flow
- * @relayHash 5b55c34fae3df1b48424901bc8448bb5
+ * @relayHash d97bc1de72e7f66849783a866b5cdc01
  */
 
 /* eslint-disable */
@@ -109,7 +109,7 @@ fragment TripCities on Trip {
 }
 
 fragment TripTimes on Trip {
-  ...Duration
+  duration
   departure {
     ...DateTime
   }
@@ -118,10 +118,6 @@ fragment TripTimes on Trip {
   }
 }
 
-fragment Duration on Trip {
-  duration
-}
-
 fragment DateTime on RouteStop {
   localTime
 }
@@ -262,7 +258,7 @@ return {
   "operationKind": "query",
   "name": "FillTravelDocumentContainerQuery",
   "id": null,
-  "text": "query FillTravelDocumentContainerQuery(\n  $bookingId: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $bookingId, authToken: $authToken) {\n    __typename\n    ...FillTravelDocument\n    id\n  }\n}\n\nfragment FillTravelDocument on BookingInterface {\n  id\n  destinationImageUrl(dimensions: _375x165)\n  ...TripInfo\n  ...PassengerTravelDocumentMenuGroup\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment PassengerTravelDocumentMenuGroup on BookingInterface {\n  passengers {\n    databaseId\n    ...TravelDocumentPassengerMenuItem\n  }\n}\n\nfragment TravelDocumentPassengerMenuItem on Passenger {\n  title\n  fullName\n  databaseId\n  travelDocument {\n    idNumber\n    expiration\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  ...Duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment Duration on Trip {\n  duration\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n",
+  "text": "query FillTravelDocumentContainerQuery(\n  $bookingId: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $bookingId, authToken: $authToken) {\n    __typename\n    ...FillTravelDocument\n    id\n  }\n}\n\nfragment FillTravelDocument on BookingInterface {\n  id\n  destinationImageUrl(dimensions: _375x165)\n  ...TripInfo\n  ...PassengerTravelDocumentMenuGroup\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment PassengerTravelDocumentMenuGroup on BookingInterface {\n  passengers {\n    databaseId\n    ...TravelDocumentPassengerMenuItem\n  }\n}\n\nfragment TravelDocumentPassengerMenuItem on Passenger {\n  title\n  fullName\n  databaseId\n  travelDocument {\n    idNumber\n    expiration\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n",
   "metadata": {},
   "fragment": {
     "kind": "Fragment",
diff --git a/app/MMB/src/scenes/travelDocument/__generated__/FillTravelDocumentQuery.graphql.js b/app/MMB/src/scenes/travelDocument/__generated__/FillTravelDocumentQuery.graphql.js
index 09bf0f1c..7c15638a 100644
--- a/app/MMB/src/scenes/travelDocument/__generated__/FillTravelDocumentQuery.graphql.js
+++ b/app/MMB/src/scenes/travelDocument/__generated__/FillTravelDocumentQuery.graphql.js
@@ -1,6 +1,6 @@
 /**
  * @flow
- * @relayHash 6258fb65d7afea573687de70a2dc6ce2
+ * @relayHash 22cc1b7451cd171eb88fb23dad88c1d0
  */
 
 /* eslint-disable */
@@ -109,7 +109,7 @@ fragment TripCities on Trip {
 }
 
 fragment TripTimes on Trip {
-  ...Duration
+  duration
   departure {
     ...DateTime
   }
@@ -118,10 +118,6 @@ fragment TripTimes on Trip {
   }
 }
 
-fragment Duration on Trip {
-  duration
-}
-
 fragment DateTime on RouteStop {
   localTime
 }
@@ -250,7 +246,7 @@ return {
   "operationKind": "query",
   "name": "FillTravelDocumentQuery",
   "id": null,
-  "text": "query FillTravelDocumentQuery(\n  $id: ID!\n) {\n  node(id: $id) {\n    __typename\n    ... on BookingInterface {\n      ...FillTravelDocument\n    }\n    id\n  }\n}\n\nfragment FillTravelDocument on BookingInterface {\n  id\n  destinationImageUrl(dimensions: _375x165)\n  ...TripInfo\n  ...PassengerTravelDocumentMenuGroup\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment PassengerTravelDocumentMenuGroup on BookingInterface {\n  passengers {\n    databaseId\n    ...TravelDocumentPassengerMenuItem\n  }\n}\n\nfragment TravelDocumentPassengerMenuItem on Passenger {\n  title\n  fullName\n  databaseId\n  travelDocument {\n    idNumber\n    expiration\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  ...Duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment Duration on Trip {\n  duration\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n",
+  "text": "query FillTravelDocumentQuery(\n  $id: ID!\n) {\n  node(id: $id) {\n    __typename\n    ... on BookingInterface {\n      ...FillTravelDocument\n    }\n    id\n  }\n}\n\nfragment FillTravelDocument on BookingInterface {\n  id\n  destinationImageUrl(dimensions: _375x165)\n  ...TripInfo\n  ...PassengerTravelDocumentMenuGroup\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment PassengerTravelDocumentMenuGroup on BookingInterface {\n  passengers {\n    databaseId\n    ...TravelDocumentPassengerMenuItem\n  }\n}\n\nfragment TravelDocumentPassengerMenuItem on Passenger {\n  title\n  fullName\n  databaseId\n  travelDocument {\n    idNumber\n    expiration\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n",
   "metadata": {},
   "fragment": {
     "kind": "Fragment",
diff --git a/app/MMB/src/scenes/tripOverview/__generated__/TripOverviewTabletQuery.graphql.js b/app/MMB/src/scenes/tripOverview/__generated__/TripOverviewTabletQuery.graphql.js
index dc081397..6194d14b 100644
--- a/app/MMB/src/scenes/tripOverview/__generated__/TripOverviewTabletQuery.graphql.js
+++ b/app/MMB/src/scenes/tripOverview/__generated__/TripOverviewTabletQuery.graphql.js
@@ -1,6 +1,6 @@
 /**
  * @flow
- * @relayHash f667cab2705dd36df81d133ac649729c
+ * @relayHash c57a2479d23df511292455ffea1c2c7f
  */
 
 /* eslint-disable */
@@ -102,7 +102,7 @@ fragment Timeline on Trip {
 
 fragment TripTitle on Trip {
   ...MulticityTitle
-  ...Duration
+  duration
 }
 
 fragment TimelineTrip on Trip {
@@ -180,10 +180,6 @@ fragment MulticityTitle on Trip {
   }
 }
 
-fragment Duration on Trip {
-  duration
-}
-
 fragment MulticityName on RouteStop {
   airport {
     city {
@@ -449,7 +445,7 @@ return {
   "operationKind": "query",
   "name": "TripOverviewTabletQuery",
   "id": null,
-  "text": "query TripOverviewTabletQuery(\n  $id: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $id, authToken: $authToken) {\n    __typename\n    ...TripOverview\n    id\n  }\n}\n\nfragment TripOverview on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...OneWayTimeline\n  }\n  ... on BookingReturn {\n    ...ReturnTimeline\n  }\n  ... on BookingMulticity {\n    ...MulticityTimeline\n  }\n}\n\nfragment OneWayTimeline on BookingOneWay {\n  trip {\n    ...Timeline\n  }\n}\n\nfragment ReturnTimeline on BookingReturn {\n  outbound {\n    ...Timeline\n  }\n  inbound {\n    ...Timeline\n  }\n}\n\nfragment MulticityTimeline on BookingMulticity {\n  trips {\n    ...Timeline\n  }\n}\n\nfragment Timeline on Trip {\n  ...TripTitle\n  departure {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  arrival {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  legs {\n    id\n  }\n  ...TimelineTrip\n}\n\nfragment TripTitle on Trip {\n  ...MulticityTitle\n  ...Duration\n}\n\nfragment TimelineTrip on Trip {\n  legs {\n    departure {\n      ...TimelineDeparture_routeStop\n    }\n    arrival {\n      ...TimelineArrival\n      ...TimelineDeparture_arrival\n    }\n    ...TimelineDeparture_legInfo\n    id\n  }\n}\n\nfragment TimelineDeparture_routeStop on RouteStop {\n  ...TimelineTitle\n  ...TimelineTerminal\n}\n\nfragment TimelineArrival on RouteStop {\n  ...TimelineTitle\n}\n\nfragment TimelineDeparture_arrival on RouteStop {\n  ...TimelineTerminal\n}\n\nfragment TimelineDeparture_legInfo on Leg {\n  flightNumber\n  operatingAirline {\n    name\n    iata\n  }\n  airline {\n    name\n    logoUrl\n    code\n  }\n  vehicle {\n    model\n    manufacturer\n  }\n}\n\nfragment TimelineTerminal on RouteStop {\n  terminal\n  airport {\n    code\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TimelineTitle on RouteStop {\n  localTime\n  airport {\n    locationId\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment MulticityTitle on Trip {\n  departure {\n    ...MulticityName\n  }\n  arrival {\n    ...MulticityName\n  }\n}\n\nfragment Duration on Trip {\n  duration\n}\n\nfragment MulticityName on RouteStop {\n  airport {\n    city {\n      name\n    }\n    id\n  }\n}\n",
+  "text": "query TripOverviewTabletQuery(\n  $id: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $id, authToken: $authToken) {\n    __typename\n    ...TripOverview\n    id\n  }\n}\n\nfragment TripOverview on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...OneWayTimeline\n  }\n  ... on BookingReturn {\n    ...ReturnTimeline\n  }\n  ... on BookingMulticity {\n    ...MulticityTimeline\n  }\n}\n\nfragment OneWayTimeline on BookingOneWay {\n  trip {\n    ...Timeline\n  }\n}\n\nfragment ReturnTimeline on BookingReturn {\n  outbound {\n    ...Timeline\n  }\n  inbound {\n    ...Timeline\n  }\n}\n\nfragment MulticityTimeline on BookingMulticity {\n  trips {\n    ...Timeline\n  }\n}\n\nfragment Timeline on Trip {\n  ...TripTitle\n  departure {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  arrival {\n    localTime\n    airport {\n      locationId\n      city {\n        name\n      }\n      id\n    }\n  }\n  legs {\n    id\n  }\n  ...TimelineTrip\n}\n\nfragment TripTitle on Trip {\n  ...MulticityTitle\n  duration\n}\n\nfragment TimelineTrip on Trip {\n  legs {\n    departure {\n      ...TimelineDeparture_routeStop\n    }\n    arrival {\n      ...TimelineArrival\n      ...TimelineDeparture_arrival\n    }\n    ...TimelineDeparture_legInfo\n    id\n  }\n}\n\nfragment TimelineDeparture_routeStop on RouteStop {\n  ...TimelineTitle\n  ...TimelineTerminal\n}\n\nfragment TimelineArrival on RouteStop {\n  ...TimelineTitle\n}\n\nfragment TimelineDeparture_arrival on RouteStop {\n  ...TimelineTerminal\n}\n\nfragment TimelineDeparture_legInfo on Leg {\n  flightNumber\n  operatingAirline {\n    name\n    iata\n  }\n  airline {\n    name\n    logoUrl\n    code\n  }\n  vehicle {\n    model\n    manufacturer\n  }\n}\n\nfragment TimelineTerminal on RouteStop {\n  terminal\n  airport {\n    code\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment TimelineTitle on RouteStop {\n  localTime\n  airport {\n    locationId\n    city {\n      name\n    }\n    id\n  }\n}\n\nfragment MulticityTitle on Trip {\n  departure {\n    ...MulticityName\n  }\n  arrival {\n    ...MulticityName\n  }\n}\n\nfragment MulticityName on RouteStop {\n  airport {\n    city {\n      name\n    }\n    id\n  }\n}\n",
   "metadata": {},
   "fragment": {
     "kind": "Fragment",
diff --git a/app/MMB/src/scenes/tripOverview/tripTitle/TripTitle.js b/app/MMB/src/scenes/tripOverview/tripTitle/TripTitle.js
index cd8d2d15..230804e1 100644
--- a/app/MMB/src/scenes/tripOverview/tripTitle/TripTitle.js
+++ b/app/MMB/src/scenes/tripOverview/tripTitle/TripTitle.js
@@ -2,14 +2,14 @@
 
 import * as React from 'react';
 import { View } from 'react-native';
-import { StyleSheet } from '@kiwicom/mobile-shared';
+import { StyleSheet, Duration } from '@kiwicom/mobile-shared';
 import { graphql, createFragmentContainer } from '@kiwicom/mobile-relay';
 import { Translation } from '@kiwicom/mobile-localization';
+import idx from 'idx';
 
 import TripOverviewContext, { type BookingType } from '../TripOverviewContext';
 import type { TripTitle as TripTitleType } from './__generated__/TripTitle.graphql';
 import MulticityTitle from './MulticityTitle';
-import Duration from '../../../components/header/Duration';
 import ReturnTitle from './ReturnTitle';
 import TripTitleText from './TripTitleText';
 
@@ -29,7 +29,7 @@ const TripTitle = ({ type, data, index }: PropsWithContext) => {
         </TripTitleText>
       )}
       <View style={styles.durationContainer}>
-        <Duration showIcon={false} data={data} />
+        <Duration showIcon={false} duration={idx(data, _ => _.duration)} />
       </View>
     </View>
   );
@@ -53,7 +53,7 @@ export default createFragmentContainer(
   graphql`
     fragment TripTitle on Trip {
       ...MulticityTitle
-      ...Duration
+      duration
     }
   `,
 );
diff --git a/app/MMB/src/scenes/tripOverview/tripTitle/__generated__/TripTitle.graphql.js b/app/MMB/src/scenes/tripOverview/tripTitle/__generated__/TripTitle.graphql.js
index e7a7a8d0..0c67eef9 100644
--- a/app/MMB/src/scenes/tripOverview/tripTitle/__generated__/TripTitle.graphql.js
+++ b/app/MMB/src/scenes/tripOverview/tripTitle/__generated__/TripTitle.graphql.js
@@ -8,12 +8,12 @@
 
 /*::
 import type { ConcreteFragment } from 'relay-runtime';
-type Duration$ref = any;
 type MulticityTitle$ref = any;
 import type { FragmentReference } from "relay-runtime";
 declare export opaque type TripTitle$ref: FragmentReference;
 export type TripTitle = {|
-  +$fragmentRefs: MulticityTitle$ref & Duration$ref,
+  +duration: ?number,
+  +$fragmentRefs: MulticityTitle$ref,
   +$refType: TripTitle$ref,
 |};
 */
@@ -32,12 +32,14 @@ const node/*: ConcreteFragment*/ = {
       "args": null
     },
     {
-      "kind": "FragmentSpread",
-      "name": "Duration",
-      "args": null
+      "kind": "ScalarField",
+      "alias": null,
+      "name": "duration",
+      "args": null,
+      "storageKey": null
     }
   ]
 };
 // prettier-ignore
-(node/*: any*/).hash = '254d4a0a445d6e14e3c10d66427172be';
+(node/*: any*/).hash = 'ece4655ee8bc801e23001381a5d7a9d8';
 module.exports = node;
diff --git a/app/MMB/src/scenes/tripServices/insurance/insuranceOverviewScene/__generated__/InsuranceOverviewSceneContainerQuery.graphql.js b/app/MMB/src/scenes/tripServices/insurance/insuranceOverviewScene/__generated__/InsuranceOverviewSceneContainerQuery.graphql.js
index e7e20312..28607b51 100644
--- a/app/MMB/src/scenes/tripServices/insurance/insuranceOverviewScene/__generated__/InsuranceOverviewSceneContainerQuery.graphql.js
+++ b/app/MMB/src/scenes/tripServices/insurance/insuranceOverviewScene/__generated__/InsuranceOverviewSceneContainerQuery.graphql.js
@@ -1,6 +1,6 @@
 /**
  * @flow
- * @relayHash a856910420e4fe30db986cc0fc3eba1a
+ * @relayHash a08797a7fcabc844de73f46e44bfcc39
  */
 
 /* eslint-disable */
@@ -120,7 +120,7 @@ fragment TripCities on Trip {
 }
 
 fragment TripTimes on Trip {
-  ...Duration
+  duration
   departure {
     ...DateTime
   }
@@ -129,10 +129,6 @@ fragment TripTimes on Trip {
   }
 }
 
-fragment Duration on Trip {
-  duration
-}
-
 fragment DateTime on RouteStop {
   localTime
 }
@@ -357,7 +353,7 @@ return {
   "operationKind": "query",
   "name": "InsuranceOverviewSceneContainerQuery",
   "id": null,
-  "text": "query InsuranceOverviewSceneContainerQuery(\n  $bookingId: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $bookingId, authToken: $authToken) {\n    __typename\n    ...DestinationImage\n    ...TripInfo\n    passengers {\n      fullName\n      title\n      birthday\n      databaseId\n      insuranceType\n    }\n    insurancePrices {\n      insuranceType\n      price {\n        amount\n        currency\n      }\n    }\n    id\n  }\n}\n\nfragment DestinationImage on BookingInterface {\n  destinationImageUrl(dimensions: _375x165)\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  ...Duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment Duration on Trip {\n  duration\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n",
+  "text": "query InsuranceOverviewSceneContainerQuery(\n  $bookingId: Int!\n  $authToken: String!\n) {\n  singleBooking(id: $bookingId, authToken: $authToken) {\n    __typename\n    ...DestinationImage\n    ...TripInfo\n    passengers {\n      fullName\n      title\n      birthday\n      databaseId\n      insuranceType\n    }\n    insurancePrices {\n      insuranceType\n      price {\n        amount\n        currency\n      }\n    }\n    id\n  }\n}\n\nfragment DestinationImage on BookingInterface {\n  destinationImageUrl(dimensions: _375x165)\n}\n\nfragment TripInfo on BookingInterface {\n  __typename\n  ... on BookingOneWay {\n    ...TripInfoOneWay\n  }\n  ... on BookingReturn {\n    ...TripInfoReturn\n  }\n  ... on BookingMulticity {\n    ...TripInfoMulticity\n  }\n}\n\nfragment TripInfoOneWay on BookingOneWay {\n  trip {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripInfoReturn on BookingReturn {\n  outbound {\n    ...TripCities\n    ...TripTimes\n  }\n  inbound {\n    ...TripTimes\n  }\n}\n\nfragment TripInfoMulticity on BookingMulticity {\n  trips {\n    ...TripCities\n    ...TripTimes\n  }\n}\n\nfragment TripCities on Trip {\n  departure {\n    ...Location\n  }\n  arrival {\n    ...Location\n  }\n}\n\nfragment TripTimes on Trip {\n  duration\n  departure {\n    ...DateTime\n  }\n  arrival {\n    ...DateTime\n  }\n}\n\nfragment DateTime on RouteStop {\n  localTime\n}\n\nfragment Location on RouteStop {\n  airport {\n    city {\n      name\n    }\n    ...CountryFlag\n    id\n  }\n}\n\nfragment CountryFlag on Location {\n  countryFlagURL\n}\n",
   "metadata": {},
   "fragment": {
     "kind": "Fragment",
diff --git a/packages/localization/src/DefaultVocabulary.js b/packages/localization/src/DefaultVocabulary.js
index f934f553..c0653a4f 100644
--- a/packages/localization/src/DefaultVocabulary.js
+++ b/packages/localization/src/DefaultVocabulary.js
@@ -49,6 +49,8 @@ const SharedVocabulary = {
   'shared.pdf_viewer.load_failed': 'Failed to load pdf',
   'shared.web_view.no_internet_connection':
     'No internet connection, please check your internet settings or try it later.',
+  'shared.hours_short': 'h',
+  'shared.minutes_short': 'm',
 };
 
 const Translations = {
diff --git a/packages/shared/index.js b/packages/shared/index.js
index 9ad9fb5e..30bf797d 100644
--- a/packages/shared/index.js
+++ b/packages/shared/index.js
@@ -43,6 +43,7 @@ export { default as PositionMarker } from './src/PositionMarker';
 export { default as Price } from './src/Price';
 export { default as Stars } from './src/Stars';
 export { default as Text } from './src/Text';
+export { default as Duration } from './src/Duration';
 
 /**
  * Layout components:
diff --git a/app/MMB/src/components/header/Duration.js b/packages/shared/src/Duration.js
similarity index 56%
rename from app/MMB/src/components/header/Duration.js
rename to packages/shared/src/Duration.js
index 447b250e..1c5427b2 100644
--- a/app/MMB/src/components/header/Duration.js
+++ b/packages/shared/src/Duration.js
@@ -2,34 +2,46 @@
 
 import * as React from 'react';
 import { View } from 'react-native';
-import { graphql, createFragmentContainer } from '@kiwicom/mobile-relay';
-import { StyleSheet, TextIcon, Text } from '@kiwicom/mobile-shared';
 import { Translation } from '@kiwicom/mobile-localization';
-import idx from 'idx';
 import { defaultTokens } from '@kiwicom/mobile-orbit';
 
-import type { Duration as DurationType } from './__generated__/Duration.graphql';
+import StyleSheet from './PlatformStyleSheet';
+import TextIcon from './icons/TextIcon';
+import Text from './Text';
+import type { StylePropType } from '../types/Styles';
 
 type Props = {|
-  +data: DurationType,
   +showIcon: boolean,
+  +duration: ?number,
+  +style?: StylePropType,
 |};
 
-export function Duration(props: Props) {
-  const { hours, minutes } = Duration.separateHours(
-    idx(props, _ => _.data.duration) || 0,
-  );
+export const separateHours = (durationInMinutes: number) => {
+  let minutes = durationInMinutes;
+
+  if (minutes < 0) {
+    minutes = 0;
+  }
+
+  const hours = Math.floor(minutes / 60);
+  minutes = minutes % 60;
+
+  return { hours, minutes };
+};
+
+export default function Duration(props: Props) {
+  const { hours, minutes } = separateHours(props.duration || 0);
 
   return (
     <View style={styleSheet.row}>
       {props.showIcon && <TextIcon code="e" style={styleSheet.durationText} />}
-      <Text style={styleSheet.durationText}>
+      <Text style={[styleSheet.durationText, props.style]}>
         <Translation passThrough=" " />
         <Translation passThrough={hours} />
-        <Translation id="mmb.trip_info.duration.hours" />
+        <Translation id="shared.hours_short" />
         <Translation passThrough=" " />
         <Translation passThrough={minutes} />
-        <Translation id="mmb.trip_info.duration.minutes" />
+        <Translation id="shared.minutes_short" />
       </Text>
     </View>
   );
@@ -39,28 +51,6 @@ Duration.defaultProps = {
   showIcon: true,
 };
 
-Duration.separateHours = (durationInMinutes: number) => {
-  let minutes = durationInMinutes;
-
-  if (minutes < 0) {
-    minutes = 0;
-  }
-
-  const hours = Math.floor(minutes / 60);
-  minutes = minutes % 60;
-
-  return { hours, minutes };
-};
-
-export default createFragmentContainer(
-  Duration,
-  graphql`
-    fragment Duration on Trip {
-      duration
-    }
-  `,
-);
-
 const styleSheet = StyleSheet.create({
   row: {
     flexDirection: 'row',


Test patch:
diff --git a/app/MMB/src/components/header/__tests__/Duration.test.js b/packages/shared/src/__tests__/Duration.test.js
similarity index 52%
rename from app/MMB/src/components/header/__tests__/Duration.test.js
rename to packages/shared/src/__tests__/Duration.test.js
index 11f4d208..7682a9aa 100644
--- a/app/MMB/src/components/header/__tests__/Duration.test.js
+++ b/packages/shared/src/__tests__/Duration.test.js
@@ -3,13 +3,13 @@
 import * as React from 'react';
 import ShallowRenderer from 'react-test-renderer/shallow';
 
-import { Duration } from '../Duration';
+import Duration, { separateHours } from '../Duration';
 
 const renderer = new ShallowRenderer();
 
 it('works as expected', () => {
   const test = (duration, expected) => {
-    expect(Duration.separateHours(duration)).toEqual(expected);
+    expect(separateHours(duration)).toEqual(expected);
   };
 
   test(-1, { hours: 0, minutes: 0 });
@@ -22,14 +22,7 @@ it('works as expected', () => {
 });
 
 it('works with broken input', () => {
-  // $FlowExpectedError: testing edge cases
-  expect(renderer.render(<Duration data={undefined} />)).toMatchSnapshot();
+  expect(renderer.render(<Duration duration={undefined} />)).toMatchSnapshot();
 
-  // $FlowExpectedError: testing edge cases
-  expect(renderer.render(<Duration data={{ aaa: 'bbb' }} />)).toMatchSnapshot();
-
-  expect(
-    // $FlowExpectedError: testing edge cases
-    renderer.render(<Duration data={{ duration: null }} />),
-  ).toMatchSnapshot();
+  expect(renderer.render(<Duration duration={null} />)).toMatchSnapshot();
 });
diff --git a/app/MMB/src/components/header/__tests__/__snapshots__/Duration.test.js.snap b/packages/shared/src/__tests__/__snapshots__/Duration.test.js.snap
similarity index 52%
rename from app/MMB/src/components/header/__tests__/__snapshots__/Duration.test.js.snap
rename to packages/shared/src/__tests__/__snapshots__/Duration.test.js.snap
index 28f45758..c2c35514 100644
--- a/app/MMB/src/components/header/__tests__/__snapshots__/Duration.test.js.snap
+++ b/packages/shared/src/__tests__/__snapshots__/Duration.test.js.snap
@@ -20,10 +20,13 @@ exports[`works with broken input 1`] = `
   />
   <Text
     style={
-      Object {
-        "color": "#7f91a8",
-        "fontSize": 10,
-      }
+      Array [
+        Object {
+          "color": "#7f91a8",
+          "fontSize": 10,
+        },
+        undefined,
+      ]
     }
   >
     <Translation
@@ -33,7 +36,7 @@ exports[`works with broken input 1`] = `
       passThrough={0}
     />
     <Translation
-      id="mmb.trip_info.duration.hours"
+      id="shared.hours_short"
     />
     <Translation
       passThrough=" "
@@ -42,7 +45,7 @@ exports[`works with broken input 1`] = `
       passThrough={0}
     />
     <Translation
-      id="mmb.trip_info.duration.minutes"
+      id="shared.minutes_short"
     />
   </Text>
 </Component>
@@ -68,58 +71,13 @@ exports[`works with broken input 2`] = `
   />
   <Text
     style={
-      Object {
-        "color": "#7f91a8",
-        "fontSize": 10,
-      }
-    }
-  >
-    <Translation
-      passThrough=" "
-    />
-    <Translation
-      passThrough={0}
-    />
-    <Translation
-      id="mmb.trip_info.duration.hours"
-    />
-    <Translation
-      passThrough=" "
-    />
-    <Translation
-      passThrough={0}
-    />
-    <Translation
-      id="mmb.trip_info.duration.minutes"
-    />
-  </Text>
-</Component>
-`;
-
-exports[`works with broken input 3`] = `
-<Component
-  style={
-    Object {
-      "alignItems": "center",
-      "flexDirection": "row",
-    }
-  }
->
-  <TextIcon
-    code="e"
-    style={
-      Object {
-        "color": "#7f91a8",
-        "fontSize": 10,
-      }
-    }
-  />
-  <Text
-    style={
-      Object {
-        "color": "#7f91a8",
-        "fontSize": 10,
-      }
+      Array [
+        Object {
+          "color": "#7f91a8",
+          "fontSize": 10,
+        },
+        undefined,
+      ]
     }
   >
     <Translation
@@ -129,7 +87,7 @@ exports[`works with broken input 3`] = `
       passThrough={0}
     />
     <Translation
-      id="mmb.trip_info.duration.hours"
+      id="shared.hours_short"
     />
     <Translation
       passThrough=" "
@@ -138,7 +96,7 @@ exports[`works with broken input 3`] = `
       passThrough={0}
     />
     <Translation
-      id="mmb.trip_info.duration.minutes"
+      id="shared.minutes_short"
     />
   </Text>
 </Component>