Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix skeleton animation on web #30458

Merged
merged 3 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
'react-native-config': 'react-web-config',
'react-native$': '@expensify/react-native-web',
'react-native-web': '@expensify/react-native-web',
'react-content-loader/native': 'react-content-loader',
'lottie-react-native': 'react-native-web-lottie',

// Module alias for web & desktop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import PropTypes from 'prop-types';
import React from 'react';
import SkeletonViewContentLoader from 'react-content-loader/native';
import {View} from 'react-native';
import {Circle, Rect} from 'react-native-svg';
import _ from 'underscore';
import SkeletonViewContentLoader from '@components/SkeletonViewContentLoader';
import styles from '@styles/styles';
import * as StyleUtils from '@styles/StyleUtils';
import themeColors from '@styles/themes/default';
Expand Down
2 changes: 1 addition & 1 deletion src/components/MoneyRequestSkeletonView.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import SkeletonViewContentLoader from 'react-content-loader/native';
import {Rect} from 'react-native-svg';
import styles from '@styles/styles';
import themeColors from '@styles/themes/default';
import variables from '@styles/variables';
import SkeletonViewContentLoader from './SkeletonViewContentLoader';
hungvu193 marked this conversation as resolved.
Show resolved Hide resolved

function MoneyRequestSkeletonView() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/OptionsListSkeletonView.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import PropTypes from 'prop-types';
import React from 'react';
import SkeletonViewContentLoader from 'react-content-loader/native';
import {View} from 'react-native';
import {Circle, Rect} from 'react-native-svg';
import styles from '@styles/styles';
import themeColors from '@styles/themes/default';
import CONST from '@src/CONST';
import SkeletonViewContentLoader from './SkeletonViewContentLoader';

const propTypes = {
/** Whether to animate the skeleton view */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import SkeletonViewContentLoader from 'react-content-loader/native';
import {Circle, Rect} from 'react-native-svg';
import SkeletonViewContentLoader from '@components/SkeletonViewContentLoader';
import styles from '@styles/styles';
import themeColors from '@styles/themes/default';
import CONST from '@src/CONST';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportHeaderSkeletonView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import PropTypes from 'prop-types';
import React from 'react';
import SkeletonViewContentLoader from 'react-content-loader/native';
import {View} from 'react-native';
import {Circle, Rect} from 'react-native-svg';
import compose from '@libs/compose';
Expand All @@ -11,6 +10,7 @@ import CONST from '@src/CONST';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
import PressableWithFeedback from './Pressable/PressableWithFeedback';
import SkeletonViewContentLoader from './SkeletonViewContentLoader';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions';

Expand Down
3 changes: 3 additions & 0 deletions src/components/SkeletonViewContentLoader/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import SkeletonViewContentLoader from 'react-content-loader';

export default SkeletonViewContentLoader;
3 changes: 3 additions & 0 deletions src/components/SkeletonViewContentLoader/index.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import SkeletonViewContentLoader from 'react-content-loader/native';

export default SkeletonViewContentLoader;
Loading