Skip to content

Commit

Permalink
Merge pull request #34395 from Expensify/rodrigo-themed-statements-link
Browse files Browse the repository at this point in the history
Sending isDarkMode to statements url
  • Loading branch information
rlinoz authored Jan 16, 2024
2 parents 77334fb + 3d62813 commit 5b03db9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/wallet/WalletStatementPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {withNetwork} from '@components/OnyxProvider';
import ScreenWrapper from '@components/ScreenWrapper';
import WalletStatementModal from '@components/WalletStatementModal';
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import useThemePreference from '@hooks/useThemePreference';
import compose from '@libs/compose';
import DateUtils from '@libs/DateUtils';
import fileDownload from '@libs/fileDownload';
Expand Down Expand Up @@ -53,6 +54,7 @@ const defaultProps = {
};

function WalletStatementPage(props) {
const themePreference = useThemePreference();
const yearMonth = lodashGet(props.route.params, 'yearMonth', null);

useEffect(() => {
Expand Down Expand Up @@ -89,7 +91,7 @@ function WalletStatementPage(props) {
const month = yearMonth.substring(4) || getMonth(new Date());
const monthName = format(new Date(year, month - 1), CONST.DATE.MONTH_FORMAT);
const title = props.translate('statementPage.title', year, monthName);
const url = `${CONFIG.EXPENSIFY.EXPENSIFY_URL}statement.php?period=${yearMonth}`;
const url = `${CONFIG.EXPENSIFY.EXPENSIFY_URL}statement.php?period=${yearMonth}${themePreference === CONST.THEME.DARK ? '&isDarkMode=true' : ''}`;

return (
<ScreenWrapper
Expand Down

0 comments on commit 5b03db9

Please sign in to comment.