mattermost-mobile/app/screens/report_a_problem/log_file_item.tsx
Daniel Espino García 5c2153f83b
Add Report a Problem functionality (#8605)
* Add Report a Problem functionality

* update cache pinned SHA version from 4.0.2 to 4.2.0

* Address feedback

* Fix tests

* Fix some issues and update kotlin coroutines version

* Fix delete file for iOS

* Bump 1 more version for coroutines

* Use rxjava instead of kotlin coroutines to avoid security issue

* Move path prefix to avoid test error

* Address feedback

* Address feedback

* Address feedback

* Use mailto on iOS

* Fix tests related to button changes

* Address feedback

* Update icon and fix onboarding buttons

* Fix test

---------

Co-authored-by: Angelos Kyratzakos <angelos.kyratzakos@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-04-24 11:12:55 +02:00

45 lines
1.3 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {View, Text} from 'react-native';
import CompassIcon from '@components/compass_icon';
import {useTheme} from '@context/theme';
import {getCommonFileStyles} from './styles';
const getCurrentDate = () => {
const date = new Date();
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}${month}${day}`;
};
const LogFileItem = () => {
const theme = useTheme();
const styles = getCommonFileStyles(theme);
const currentDate = getCurrentDate();
return (
<View style={styles.container}>
<CompassIcon
name='file-zip-outline-large'
size={40}
color={theme.centerChannelColor}
testID='log-file-icon'
/>
<View style={styles.header}>
<Text style={styles.name}>
{`Logs_${currentDate}`}
</Text>
<Text style={styles.type}>
{'ZIP'}
</Text>
</View>
</View>
);
};
export default LogFileItem;