-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27420 from tienifr/fix/26657
fix: 26657 Another error message for a short time when opening archived chat from search bar
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import SkeletonViewContentLoader from 'react-content-loader/native'; | ||
import {View} from 'react-native'; | ||
import {Rect} from 'react-native-svg'; | ||
import compose from '../libs/compose'; | ||
import styles from '../styles/styles'; | ||
import themeColors from '../styles/themes/default'; | ||
import withLocalize from './withLocalize'; | ||
import withWindowDimensions from './withWindowDimensions'; | ||
|
||
const propTypes = { | ||
/** Whether to animate the skeleton view */ | ||
shouldAnimate: PropTypes.bool, | ||
}; | ||
|
||
const defaultTypes = { | ||
shouldAnimate: true, | ||
}; | ||
|
||
function ArchivedReportFooterSkeletonView(props) { | ||
return ( | ||
<View style={[styles.flexRow, styles.alignItemsCenter, styles.archivedReportFooter, styles.hoveredComponentBG]}> | ||
<SkeletonViewContentLoader | ||
animate={props.shouldAnimate} | ||
width={styles.w100.width} | ||
height={48} | ||
backgroundColor={themeColors.skeletonLHNIn} | ||
foregroundColor={themeColors.skeletonLHNOut} | ||
> | ||
<Rect | ||
x="0" | ||
y="0" | ||
width="100%" | ||
height="48" | ||
rx="8" | ||
ry="8" | ||
/> | ||
</SkeletonViewContentLoader> | ||
</View> | ||
); | ||
} | ||
|
||
ArchivedReportFooterSkeletonView.propTypes = propTypes; | ||
ArchivedReportFooterSkeletonView.defaultProps = defaultTypes; | ||
|
||
ArchivedReportFooterSkeletonView.displayName = 'ArchivedReportFooterSkeletonView'; | ||
export default compose(withWindowDimensions, withLocalize)(ArchivedReportFooterSkeletonView); |