minor changes

This commit is contained in:
Sam 2018-05-10 11:36:08 +02:00
parent 5f98f1525d
commit c6b7003af8
2 changed files with 15 additions and 13 deletions

View File

@ -7,6 +7,8 @@ app = create_app()
@app.cli.command() @app.cli.command()
def drop_db(): def drop_db():
"""Empty database for dev environments."""
db.engine.execute("DROP TABLE IF EXISTS alembic_version;")
db.drop_all() db.drop_all()
db.session.commit() db.session.commit()
print('Database dropped.') print('Database dropped.')

View File

@ -19,26 +19,26 @@ class DashBoard extends React.Component {
<title>mpwo - Dashboard</title> <title>mpwo - Dashboard</title>
</Helmet> </Helmet>
<h1 className="page-title">Dashboard</h1> <h1 className="page-title">Dashboard</h1>
<div className="container"> {activities.length > 0 ? (
<div className="row"> <div className="container">
<div className="col-md-6"> <div className="row">
{activities.length > 0 ? ( <div className="col-md-6">
activities.map(activity => ( {activities.map(activity => (
<ActivityCard <ActivityCard
activity={activity} activity={activity}
key={activity.id} key={activity.id}
sports={sports} sports={sports}
/> />
)) ))}
) : ( </div>
'No activities for now' <div className="col-md-6">
)} <Statistics />
</div> </div>
<div className="col-md-6">
<Statistics />
</div> </div>
</div> </div>
</div> ) : (
'No activities for now'
)}
</div> </div>
) )
} }