Skip to content

Commit

Permalink
review: apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexruzenhack committed May 28, 2024
1 parent bf9d3f1 commit e1d912d
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 15 deletions.
2 changes: 1 addition & 1 deletion locale/da/texts.po
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ msgstr "[Sidste] dddd [•] HH:mm"
msgid "DD MMM YYYY [•] HH:mm"
msgstr "DD MMM YYYY [•] HH:mm"

#: src/utils.js:159
#: src/utils.js:160
msgid "Invalid address"
msgstr "Ugyldig adresse"

Expand Down
2 changes: 1 addition & 1 deletion locale/pt-br/texts.po
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ msgstr "[Última] dddd [•] HH:mm"
msgid "DD MMM YYYY [•] HH:mm"
msgstr "DD MMM YYYY [•] HH:mm"

#: src/utils.js:159
#: src/utils.js:160
msgid "Invalid address"
msgstr "Endereço inválido"

Expand Down
2 changes: 1 addition & 1 deletion locale/ru-ru/texts.po
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ msgstr "[Последний] dddd [•] HH:mm"
msgid "DD MMM YYYY [•] HH:mm"
msgstr "DD MMM YYYY [•] HH:mm"

#: src/utils.js:159
#: src/utils.js:160
msgid "Invalid address"
msgstr "Неправильный адрес"

Expand Down
2 changes: 1 addition & 1 deletion locale/texts.pot
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ msgstr ""
msgid "DD MMM YYYY [•] HH:mm"
msgstr ""

#: src/utils.js:159
#: src/utils.js:160
msgid "Invalid address"
msgstr ""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) Hathor Labs and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import {
StyleSheet,
Expand All @@ -6,7 +13,7 @@ import {
} from 'react-native';
import { COLORS } from '../styles/themes';

import { PenIcon } from './Icon/Pen.icon';
import { PenIcon } from './Icons/Pen.icon';

export const EditInfoContainer = ({ center, onPress, children }) => (
<TouchableOpacity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
* LICENSE file in the root directory of this source tree.
*/

import React, { ReactNode } from 'react';
import React from 'react';
import {
StyleSheet,
View,
Text,
StyleProp,
ViewStyle
} from 'react-native';
import Modal from 'react-native-modal';

Expand All @@ -30,7 +28,6 @@ const ModalBase = ({ styleModal, styleWrapper, show, onDismiss, children }) => {
const button = hasChildren && React.Children.toArray(children).find(
(child) => child.type.displayName === Button.displayName
);

const discreteButton = hasChildren && React.Children.toArray(children).find(
(child) => child.type.displayName === DiscreteButton.displayName
);
Expand Down Expand Up @@ -70,11 +67,9 @@ const Title = ({ children }) => (
Title.displayName = 'ModalBaseTitle';

/**
* @typedef {Object} Properties p
* @property {ReactNode} p.children
* @property {StyleProp<ViewStyle>} p.style
*
* @param {Properties}
* @param {Object} props
* @property {ReactNode} props.children
* @property {StyleProp<ViewStyle>} props.style
*/
const Body = ({ style, children }) => (
<View style={style}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) Hathor Labs and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import {
StyleSheet,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) Hathor Labs and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import {
StyleSheet,
Expand Down
9 changes: 8 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,4 +405,11 @@ export const getNanoContractFeatureToggle = (state) => (
state.featureToggles[NANO_CONTRACT_FEATURE_TOGGLE]
);

export const getTimestampFormat = (timestamp) => moment.unix(timestamp).format('DD MMM YYYY [•] HH:mm')
/**
* Get timestamp in specific format.
*
* @param {number} timestamp
*
* @returns {string} formatted timestamp
*/
export const getTimestampFormat = (timestamp) => moment.unix(timestamp).format(t`DD MMM YYYY [•] HH:mm`)

0 comments on commit e1d912d

Please sign in to comment.