Skip to content

Commit

Permalink
feat(3491503520): Disable deploy if wallet is not connected (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
galuzan-starkware authored Feb 7, 2023
1 parent 6cdd275 commit 6c65b6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Features/Editor/EditorButtons/EditorButtons.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {useStarknetWallet} from '@starkware-industries/commons-js-components';
import PropTypes from 'prop-types';
import React, {useContext} from 'react';
import {ReactComponent as FormatIcon} from '../../../../assets/svg/auto-format.svg';
Expand Down Expand Up @@ -34,6 +35,7 @@ const EditorButtons = ({
}) => {
const {color5, color5Hover} = colors;
const {isCairoMode} = useContext(AppContext);
const {account} = useStarknetWallet();
const buttons = {
left: [
isCairoMode
Expand Down Expand Up @@ -70,6 +72,7 @@ const EditorButtons = ({
},
{
icon: DeployIcon,
isDisabled: !account,
text: isCairoMode
? EDITOR_BTN_TXT.DEPLOY_ON_STARKNET
: EDITOR_BTN_TXT.DEPLOY,
Expand Down

0 comments on commit 6c65b6e

Please sign in to comment.