Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc frontend fixes - HashRouter, NavLinks, styling changes. #490

Merged
merged 3 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect } from 'react';
import { connect } from 'react-redux';
import { BrowserRouter as Router } from 'react-router-dom';
import { HashRouter as Router } from 'react-router-dom';

import Routes from './Routes';
import Header from './components/main/header/Header';
Expand Down
14 changes: 7 additions & 7 deletions src/components/main/header/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Link, NavLink } from 'react-router-dom';
import COLORS from '../../../styles/COLORS';

const Header = () => {
Expand Down Expand Up @@ -33,19 +33,19 @@ const Header = () => {
<div id="navbar" className="navbar-menu">
<div className="navbar-end">
<div className="navbar-item">
<Link to="/comparison" style={cta2Style}>
<NavLink to="/comparison" activeClassName="navbar-selected" style={cta2Style}>
Comparison Tool
</Link>
</NavLink>
</div>
<div className="navbar-item">
<Link to="/about" style={backgroundStyle}>
<NavLink to="/about" activeClassName="navbar-selected" style={backgroundStyle}>
About 311 Data
</Link>
</NavLink>
</div>
<div className="navbar-item">
<Link to="/contact" style={backgroundStyle}>
<NavLink to="/contact" activeClassName="navbar-selected" style={backgroundStyle}>
Contact Us
</Link>
</NavLink>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/main/menu/NCSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const NCSelector = ({
<div
className="nc-list"
style={{
height: '231px',
height: '200px',
overflowX: 'hidden',
msOverflowY: 'scroll',
padding: '10px 23px 10px 10px',
Expand Down
2 changes: 1 addition & 1 deletion src/components/main/menu/Submit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Submit = ({
};

return (
<div className="level" style={{ padding: '50px 192px' }}>
<div className="level" style={{ padding: '25px 192px 15px' }}>
<div className="level-item">
<Button
id="sidebar-submit-button"
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_base.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// layout vars
$header-height: 60px;
$header-height: 62px;
$footer-height: 52px;
$menu-width: 509px;
$menu-transition: all 0.5s ease 0s;
Expand Down
6 changes: 6 additions & 0 deletions src/styles/main/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@
font-size: 16px;
margin-right: 46px;
}

.navbar-selected {
border-bottom: 5px solid $brand-cta1-color;
padding-bottom: 2px;
margin-bottom: -7px;
}
}
2 changes: 1 addition & 1 deletion src/styles/main/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

.menu-content {
padding: 16px;
overflow: scroll;
overflow: auto;
height: calc(100% - #{$tabs-height});
h1 {
margin-bottom: 8px;
Expand Down