Skip to content

Commit

Permalink
Updated code
Browse files Browse the repository at this point in the history
  • Loading branch information
albertolive committed Jul 25, 2023
1 parent d6d3ddb commit f077048
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
19 changes: 17 additions & 2 deletions ui/components/ui/metafox-logo/horizontal-logo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';

const LOGO_WIDTH = 162;
Expand All @@ -9,7 +9,22 @@ const FLASK_PILL_TEXT = 'var(--color-overlay-inverse)';
const BETA_PILL_BACKGROUND = 'var(--color-primary-default)';
const BETA_PIL_TEXT = 'var(--color-primary-inverse)';

export default function MetaFoxHorizontalLogo({ theme = 'light', className }) {
export default function MetaFoxHorizontalLogo({
theme: themeProps,
className,
}) {
const [theme, setTheme] = useState(themeProps);

useEffect(() => {
setTheme(document.documentElement.getAttribute('data-theme'));
}, []);

useEffect(() => {
if (themeProps !== undefined) {
setTheme(themeProps);
}
}, [themeProps]);

const fill = theme === 'dark' ? 'rgb(255,255,255)' : 'rgb(22,22,22)';

switch (process.env.METAMASK_BUILD_TYPE) {
Expand Down
6 changes: 3 additions & 3 deletions ui/pages/unlock-page/unlock-page.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ export default class UnlockPage extends Component {
const { t } = this.context;
const { onRestore } = this.props;

let needHelpText = t('needHelpLinkText');
let needHelpText = t('appNameMmi');

///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
needHelpText = t('appNameMmi');
///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask)
needHelpText = t('needHelpLinkText');
///: END:ONLY_INCLUDE_IN

return (
Expand Down

0 comments on commit f077048

Please sign in to comment.