This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple workaround for Relay bug (see: facebook/relay#1913). I have no idea how to write tests for this part of application. I would prefer to merge this and think about later since we will need to refactor it a little bit because of other tests...
- Loading branch information
Showing
11 changed files
with
150 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// @flow | ||
|
||
import * as React from 'react'; | ||
import { Text, View, StyleSheet } from 'react-native'; | ||
import { Color } from '@kiwicom/react-native-app-common'; | ||
|
||
type Props = {| | ||
children: React.Node, | ||
|}; | ||
|
||
export default function PartialFailure({ children }: Props) { | ||
const style = createStyle(); | ||
return [ | ||
children, | ||
<View key="warning" style={style.container}> | ||
<Text> | ||
Some parts of the page may be missing due to partial server error. | ||
</Text> | ||
</View>, | ||
]; | ||
} | ||
|
||
function createStyle() { | ||
return StyleSheet.create({ | ||
container: { | ||
flexDirection: 'row', | ||
justifyContent: 'center', | ||
position: 'absolute', | ||
left: 0, | ||
right: 0, | ||
bottom: 0, | ||
backgroundColor: Color.red.$100, | ||
paddingVertical: 5, | ||
paddingHorizontal: 10, | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters