mirror of
https://github.com/rjNemo/devbook_ts
synced 2026-06-12 13:36:43 +00:00
add Dashboard page and test
This commit is contained in:
parent
6983df3f60
commit
79a97738b5
4 changed files with 91 additions and 0 deletions
|
|
@ -25,4 +25,9 @@ describe('App Router', () => {
|
|||
cy.visit(ROUTES.PROFILE);
|
||||
cy.get('section');
|
||||
});
|
||||
|
||||
it('contains Dashboard page', () => {
|
||||
cy.visit(ROUTES.DASHBOARD);
|
||||
cy.get('section');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@ export const SIGN_UP: string = '/signup';
|
|||
export const SIGN_IN: string = '/signin';
|
||||
export const DEVELOPERS: string = '/developers';
|
||||
export const PROFILE: string = '/profile';
|
||||
export const DASHBOARD: string = '/dashboard';
|
||||
|
|
|
|||
83
src/pages/Dashboard.tsx
Normal file
83
src/pages/Dashboard.tsx
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
import React from 'react';
|
||||
|
||||
const Dashboard = () => {
|
||||
return (
|
||||
<section className="container">
|
||||
<h1 className="large text-primary">Dashboard</h1>
|
||||
<p className="lead">
|
||||
<i className="fa fa-user"></i> Welcome John
|
||||
</p>
|
||||
<div className="dash-buttons">
|
||||
<a href="create-profile.html" className="btn btn-light">
|
||||
{' '}
|
||||
<i className="fa fa-user-circle text-primary"></i> Edit Profile
|
||||
</a>
|
||||
<a href="add-experience.html" className="btn btn-light">
|
||||
{' '}
|
||||
<i className="fa fa-black-tie text-primary"></i> Add Experience
|
||||
</a>
|
||||
<a href="add-education.html" className="btn btn-light">
|
||||
{' '}
|
||||
<i className="fa fa-graduation-cap text-primary"></i> Add Education
|
||||
</a>
|
||||
</div>
|
||||
<h2 className="my-2">Experience Credentials</h2>
|
||||
<table className="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<th className="hide-sm">Title</th>
|
||||
<th className="hide-sm">Years</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Microsoft</td>
|
||||
<td className="hide-sm">Senior Developer</td>
|
||||
<td className="hide-sm">Oct 2011 - Current</td>
|
||||
<td>
|
||||
<button className="btn btn-danger">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sun Microsystems</td>
|
||||
<td className="hide-sm">System Admin</td>
|
||||
<td className="hide-sm">Oct 2004 - Nov 2010</td>
|
||||
<td>
|
||||
<button className="btn btn-danger">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</thead>
|
||||
</table>
|
||||
<h2 className="my-2">Education Credentials</h2>
|
||||
<table className="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>School</th>
|
||||
<th className="hide-sm">Degree</th>
|
||||
<th className="hide-sm">Years</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>University of Washington</td>
|
||||
<td className="hide-sm">Computer Science</td>
|
||||
<td className="hide-sm">Sep 1993 - June 1999</td>
|
||||
<td>
|
||||
<button className="btn btn-danger">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</thead>
|
||||
</table>
|
||||
<div className="my-2">
|
||||
<button className="btn btn-danger">
|
||||
<i className="fa fa-user"></i> Delete my Account
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default Dashboard;
|
||||
|
|
@ -5,6 +5,7 @@ import SignUp from '../pages/SignUp';
|
|||
import SignIn from '../pages/SignIn';
|
||||
import Developers from '../pages/Developers';
|
||||
import Profile from '../pages/Profile';
|
||||
import Dashboard from '../pages/Dashboard';
|
||||
import * as ROUTES from '../constants/routes';
|
||||
|
||||
const Router: FC = () => (
|
||||
|
|
@ -14,6 +15,7 @@ const Router: FC = () => (
|
|||
<Route exact path={ROUTES.SIGN_IN} component={SignIn} />
|
||||
<Route exact path={ROUTES.DEVELOPERS} component={Developers} />
|
||||
<Route exact path={ROUTES.PROFILE} component={Profile} />
|
||||
<Route exact path={ROUTES.DASHBOARD} component={Dashboard} />
|
||||
</Switch>
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue