Styled Component Help

Learning styled components from the react 101 course and got stuck with some errors can someone help please:

my code looks proper:

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';

const Section = styled.section`
  border: 1px solid red;
`;

export default class AccountBalance extends Component {
  render() {
    return (
      <Section>
        $ {this.props.amount}
      </Section>
    );
  }
}


AccountBalance.propTypes = {
  amount: PropTypes.number.isRequired
}

1 Like

can you try this

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';

const section = styled.section`
    border: 1px solid red;
`
const AccountBalance = ({amount}) => {

    return(
        <Section>{amount}</Section>
    )
}

export default AccountBalance

if this does not work please share your github repo and i will fix it for you

1 Like

:woozy_face: new to web dev thanks I don’t know git/github yet, I’ll backtrack lol thanks for the help tho

1 Like

ok i will help you get git installed because i want to help fix this for you. first off go to git hub and make an account sign up with your email. then watch this video on installing git
https://www.youtube.com/watch?v=4xqVv2lTo40
when you do these two things get back to me and ill show how to upload your code to github