I've been trying to render html in my react code, however each time I start my page and click 'signup' I get the 'login' view. Is there something wrong with my linking?
App.js
class App extends Component {
render() {
return (
<div className="App">
<div className = "loginBox">
<div className = "glass">
<img src= {cupcake} className = "user" />
<h3>Sign in Here</h3>
<form>
<div className = "inputBox">
<input type="text" name="" placeholder="Username" />
<span><i className="fa fa-user" aria-hidden="true"></i></span>
</div>
<div className = "inputBox">
<input type="password" name="" placeholder="Password" />
<span><i className="fa fa-lock" aria-hidden="true"></i></span>
</div>
<input type="submit" name="" value="Login" />
</form>
<a href= "#">Forgot Passwordk?</a>
<br />
<a href={'./signup.js'}>Sign up!</a>
</div>
</div>
</div>
);
}
}
export default App;
signup.js
class Signup extends Component {
render() {
return (
<div className="Signup">
<div className = "loginBox">
<div className = "glass">
<img src= { cupcake} className = "user" />
<h3>Signup Here!</h3>
<form>
<div className = "inputBox">
<input type="text" name="" placeholder="Username" />
<span><i className="fa fa-user" aria-hidden="true"></i></span>
</div>
<div className = "inputBox">
<input type="password" name="" placeholder="Password" />
<span><i className="fa fa-lock" aria-hidden="true"></i></span>
</div>
<input type="submit" name="" value="Login" />
</form>
<a href="#">Login!</a>
</div>
</div>
</div>
);
}
}
export default Signup;
I keep getting the view of app.js rather than signup.js, any advice will be greatly appreciated. Thank you!