ubclaunchpad / bounce

🏀 Bringing people with common interests together
MIT License
3 stars 4 forks source link

Add ViewUser component #144

Open bfbachmann opened 5 years ago

bfbachmann commented 5 years ago

You'll need to create a new component called ViewUser.js. See https://reactjs.org/tutorial/tutorial.html for a tutorial.

bfbachmann commented 5 years ago

You'll need to update App.js by adding a route that allows you to get to the ViewUser component:

<Route path='/users/:username' component={this.getViewUserPage} />

You'll also have to add a getViewUserPage method to App.js that returns a ViewUser component that is initialized with the user's username:

getViewUserPage(filter) {
        const username = decodeURIComponent(filter.match.params.username);
        return <ViewUser
            client={this.props.client}
            username={username}
        />;
    }