Deploying new contract to etherium network with web3.js

I have tried to run this code with relevant dependencies to get contract address and I received an error

No "from" address specified in neither the given options, nor the default options. from the browser. Additionally, there is no error while deploying with the Remix tool by using metamask ropsten testnet.

onSubmit = async (event) => {
    event.preventDefault();
    this.setState({ loading: true, errorMessage: '' }); 
    try {
        const accounts = await web3.eth.getAccounts();
        console.log(accounts)
        await factory.methods
        .createCampaign(this.state.minimumContribution)
        .send({ from: accounts[0] })
        Router.pushRoute('/');
    } catch (err) {
        this.setState({ errorMessage: err.message }) 
    }
    this.setState({ loading: false });
}