Skip to content

Commit

Permalink
review: apply fix suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexruzenhack committed May 23, 2024
1 parent d3ce910 commit 090211f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion locale/pt-br/texts.po
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ msgstr "Você pode acompanhar os Nano Contracts registrados nesta tela."

#: src/components/NanoContract/RegisterNewNanoContractButton.js:22
msgid "Register new"
msgstr "Registrar um token"
msgstr "Registrar Nano Contract"

#~ msgid "Learn More."
#~ msgstr "Saiba mais"
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 @@ -1216,7 +1216,7 @@ msgstr ""

#: src/components/NanoContract/RegisterNewNanoContractButton.js:22
msgid "Register new"
msgstr "Зарегистрировать токен"
msgstr ""

#~ msgid "TOKENS"
#~ msgstr "ТОКЕНЫ"
Expand Down
6 changes: 3 additions & 3 deletions src/components/NanoContract/NanoContractsListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import { NanoContractIcon } from './NanoContractIcon.icon';
*
* @param {Object} ncItem
* @property {Object} ncItem.item registered Nano Contract data
* @property {number} ncItem.index position in the list
* @property {() => {}} ncItem.onPress A void function to be called when item is pressed.
*/
export const NanoContractsListItem = ({ item, onPress }) => (
<Wrapper onPress={onPress}>
<Icon />
<ContentWrapper nc={item} />
<ArrowLeft />
<ArrowRight />
</Wrapper>
);

Expand Down Expand Up @@ -58,7 +58,7 @@ const ContentWrapper = ({ nc }) => (
</View>
);

const ArrowLeft = () => (
const ArrowRight = () => (
<View>
<Image source={chevronRight} width={24} height={24} />
</View>
Expand Down
10 changes: 5 additions & 5 deletions src/screens/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ const listOption = {

/**
* @param {listOption} currList the list component selected to be rendered.
* @returns {boolean} `true` if tokens list is selected, `false` otherwier.
* @returns {boolean} `true` if tokens list is selected, `false` otherwise.
*/
const isTokensSelected = (currList) => currList === listOption.tokens;

/**
* @param {listOption} currList the list component selected to be rendered.
* @returns {boolean} `true` if nanoContracts list is selected, `false` otherwier.
* @returns {boolean} `true` if nanoContracts list is selected, `false` otherwise.
*/
const isNanoContractsSelected = (currList) => currList === listOption.nanoContracts;

Expand All @@ -93,7 +93,7 @@ export const Dashboard = () => {
selectedToken,
tokensMetadata,
} = useSelector(getTokensState);
const isNanoContratEnabled = useSelector(getNanoContractFeatureToggle);
const isNanoContractEnabled = useSelector(getNanoContractFeatureToggle);

const [currList, selectList] = useState(listOption.tokens);
const navigation = useNavigation();
Expand Down Expand Up @@ -122,7 +122,7 @@ export const Dashboard = () => {
<AskForPushNotification navigation={navigation} />
<AskForPushNotificationRefresh />
{ // Only show the toggle button when Nano Contract is enabled to the wallet
isNanoContratEnabled
isNanoContractEnabled
&& (
<DashBoardHeader>
<TwoOptionsToggle
Expand Down Expand Up @@ -150,7 +150,7 @@ export const Dashboard = () => {
)
}
{ // Only show if Nano Contract is enabled in the wallet
isNanoContratEnabled
isNanoContractEnabled
&& isNanoContractsSelected(currList)
&& <NanoContractsList />
}
Expand Down

0 comments on commit 090211f

Please sign in to comment.