Help! On/off button

Hi! Fairly new to C# but I know a fair amount.

The problem I have is assigning a key (in this case: x) to make it switch the Minimap camara on and off.
I think the way I’ve coded it, its just running the on and off state’s at the same time resulting in no change.
How can I fix what seems like a really easy thing to get working?

Cheers!

using UnityEngine;
using System.Collections;

public class MiniMapState : MonoBehaviour {

Transform myTransform;
public int mapState;

// Use this for initialization
void Start () {
	myTransform = transform;
	mapState = 1;
}

// Update is called once per frame
void Update () {

	if(mapState == 1)
	{
	if(Input.GetKeyDown("x"))
		{
		 GameObject.Find("Minimap").GetComponent<Camera>().enabled = false;
		}

		if(Input.GetKeyUp("x"))
		{
			mapState = 0;
		}
	}

	if(mapState == 0);
	{
		if(Input.GetKeyDown("x"))
		{
			GameObject.Find("Minimap").GetComponent<Camera>().enabled = true;
		}

		if(Input.GetKeyUp("x"))
		{
			mapState = 1;
		}

	}

}

}

Well if you wanted to create a toggle you could use a boolean and use just getkeydown to toggle the boolean as follows:

    bool toggleMe=false;
    
    void update(){
          if(toggleme){
              //toggle is on, so turn camera on
}else{
             //Toggle is off, so turn camera off.
}
         if(Input.GetKeyDown(KeyCode.X)){
              toggleMe=!toggleMe;
         }
    }