boolean-uk / team-dev-frontend-client

1 stars 11 forks source link

Create component - Navigation Rail #123

Closed lucianosimoni closed 1 year ago

lucianosimoni commented 1 year ago

Component Name: NavigationRail

Create it in a folder with same name under components

Where it will be used

In all of the pages of the project, as a reusable component. In the App.js, so it will always show in all pages.


Requirements:

Must receive as a prop loggedInUser from the component calling it

<NavigationRail user={ loggedInUser } />

How is received by the component:

function NavigationRail ({ user }) {....

Have 3 fixed Buttons (Home, Profile, Cohort)

Use the Google Icons as icons.

Have 2 conditional Buttons that are rendered only if User is a teacher Check for the prop user and render only if role is TEACHER - Notes - - Link to /notes/${user.id} - Logs - - Link to /logs/${user.id}

No need for the Notes and Logs for the moment.

> Create notes and logs placeholder pages

Create Routes for the Links

Notes and Logs also does not have a Route setup in the App.js URLs:


Possible jsx structure:

<li className="nav-item-panel">
    <div className="icon-circle">
        <span className="material-symbols-outlined">home</span>
    </div>

    <span className="nav-item-name">Home</span>
</li>

.nav-item-panel could work with display:flex flex-direction:column, to avoid use of grid


Image

chris2733 commented 1 year ago

Looks great! Well broken down