Skip to content
Draft
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
1 change: 0 additions & 1 deletion .nycrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"**/*.test.js",
"src/guides/*.js",
"src/icons/*.js",
"src/pages/Landing/*.js",
"src/serviceWorker.js",
"src/setupTests.js"
]
Expand Down
2 changes: 1 addition & 1 deletion BOOKMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ browser) Test Server](https://test-civictechindexadmin.herokuapp.com/swagger/)
[Our Swagger (API
browser) Stage Server](https://api-stage.civictechindex.org/swagger/)

[Civic Tech Index dot org Live Site](http://civictechindex.org/home)
[Civic Tech Index dot org Live Site](http://civictechindex.org)

## Documentation and 3rd Party Links

Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/faqs.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{
"id": 5,
"question": "What is Civic Tech Index?",
"answer": "<a href=\"http://civictechindex.org/home\">Civic Tech Index</a> is a comprehensive, searchable index of all civic tech open-source software projects around the world. It helps to create large-scale engagement, overlapping technologies, and disciplines. People of all different skills and levels working to problem solve, projects that are legitimate and trustworthy.",
"answer": "<a href=\"http://civictechindex.org\">Civic Tech Index</a> is a comprehensive, searchable index of all civic tech open-source software projects around the world. It helps to create large-scale engagement, overlapping technologies, and disciplines. People of all different skills and levels working to problem solve, projects that are legitimate and trustworthy.",
"view_count": 57
},
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/components/footer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ describe('Footer', () => {
const RANDOM_EMAIL = `test_${faker.internet.email()}`;

before(() => {
cy.visit('/home');
});
cy.visit('/');
})

it('footer loads', () => {
cy.get('[class*=containerFooter]').within(() => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/components/header.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ describe('Header component', () => {
};

beforeEach(() => {
cy.visit('/home');
cy.visit('/');
});

it('loads nav links', () => {
cy.viewport(1280, 800);
for (const headerItem in menuItems) {
cy.findLink(headerItem)
.should('have.attr', 'href', '/home')
.should('have.attr', 'href', '/')
.trigger('mouseover')
.get('[data-cy=menu-item]')
.within(() => {
Expand Down
6 changes: 1 addition & 5 deletions cypress/integration/pages/home.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
describe('Home Page', () => {
before(() => {
cy.visit('/home')
})

beforeEach(() => {
// cy.visit('/home')
cy.visit('/')
})

it('header loads', () => {
Expand Down
22 changes: 0 additions & 22 deletions cypress/integration/pages/landing.spec.js

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/integration/pages/organizations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe('Organizations Page (using API)', () => {
cy.intercept(`${Cypress.env('REACT_APP_API_URL')}/api/organizations/`).as(
'getOrganizations'
);
cy.visit('/home');
cy.visit('/');
cy.contains('View contributors').click();
cy.wait('@getOrganizations');
cy.get('[class*=containerWhite]').should(
Expand Down
6 changes: 2 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import Faq from './pages/Faq';
import IndvOrgPage from './pages/IndvOrganization';
import Home from './pages/Home';
import HowToAdd from './pages/HowToAdd';
import Landing from './pages/Landing';
import SearchProjects from './pages/SearchProjects';
import TagGeneratorWizard from './pages/TagGeneratorWizard';
import Error404 from './pages/Error404';
Expand Down Expand Up @@ -51,7 +50,7 @@ const App = () => {
<QueryParamProvider ReactRouterRoute={Route}>
<Layout>
<Switch>
<Route exact path='/' component={Landing} />
<RouteTitled exact path='/' component={Home} title='Home' />
<RouteTitled exact path='/about/what-is-cti' component={WhatIsCTI} title='What is CTI?' />
<RouteTitled
exact
Expand Down Expand Up @@ -126,6 +125,7 @@ const App = () => {
<Redirect from='/donate' to='/radical-collaboration/donate' />
<Redirect from='/donation' to='/radical-collaboration/donate' />
<Redirect from='/faq' to='/about/faq' />
<Redirect from='/home' to='/' />
<Redirect from='/how' to='/join-index/how-to-add' />
<Redirect from='/how-to' to='/join-index/how-to-add' />
<Redirect from='/how-to-use' to='/join-index/how-to-add' />
Expand All @@ -141,8 +141,6 @@ const App = () => {
<Redirect from='/taggenerator' to='/join-index/tag-generator-wizard' />
{/* test and error page redirect begin */}
<Redirect from='/guides' to='/guides/colors' />
<Redirect from='/placeholder' to='/blank' />
<Redirect from='/template' to='/blank' />
<Redirect to='/404' />
{/* test and error page redirect end */}
</Switch>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/HeaderLarge.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const HeaderLarge = () => {

return (
<nav className={classes.nav}>
<Link to='/home'>
<Link to='/'>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.

<img
className={classes.logo}
src='/images/cti-logo.svg'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/HeaderSmall.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const HeaderSmall = () => {

return (
<nav className={classes.nav}>
<Link to='/home'>
<Link to='/'>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.

<img className={classes.logo} src='/images/cti-logo.svg' alt='civic logo' />
</Link>
Comment on lines +22 to 24
Copy link
Member

@mealthebear mealthebear Oct 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could be wrong about this; but React Context API could be useful here to get rid of the Codeclimate duplicate code error and share this unit of code with the HeaderSmall.js & HeaderLarge.js files. Definitely something more appropriate for an entirely separate issue, though. Just figured I would throw this out on the radar.

<div
Expand Down
11 changes: 1 addition & 10 deletions src/components/common/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@ import { withRouter } from "react-router-dom";
import Footer from "../Footer";
import Header from "../Header";

const Layout = (props) => {
const { children, location } = props;

if (location.pathname === '/') {
return (
<>
{children}
</>
)
}
const Layout = ({ children }) => {
return (
<>
<Header />
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import App from './App';
import * as serviceWorker from './serviceWorker';
import themeMui from './theme-mui';

const ga4react = new GA4React('G-5V7GWWCKF0'); // Google Analytics 4 measurement ID
const ga4react = new GA4React('G-C68BN2R6GQ'); // Google Analytics 4 measurement ID
const theme = createMuiTheme(themeMui);

WebFont.load({
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Collaborate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { Typography } from '@material-ui/core';

const Collaborate = () => {
const breadCrumbLinks = [
{ name: 'Home', href: '/home' },
{ name: 'Collaborate with Us', href: '/radical-collaboration/collaborate' },
{ href: '/', name: 'Home' },
{ href: '/radical-collaboration/collaborate', name: 'Collaborate with Us' },
];

return (
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Contact/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { GenericHeaderSection } from '../../components/';

const Contact = () => {
const breadCrumbLinks = [
{ name: 'Home', href: '/home' },
{ name: 'Contact', href: '/about/contact' },
{ href: '/', name: 'Home' },
{ href: '/about/contact', name: 'Contact' },
];
const handlePageHeight = () => {
window.parent.scrollTo(0, 0);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Contributors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ export default function Contributors() {
};

const breadCrumbLinks = [
{ name: 'Home', href: '/home' },
{ name: 'Civic Tech Organizations', href: '/organizations' },
{ href: '/', name: 'Home' },
{ href: '/organizations', name: 'Civic Tech Organizations' },
];

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Donate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { GenericHeaderSection } from '../../components';
const Donate = () => {
const classes = useStyles();
const breadCrumbLinks = [
{ href: '/home', name: 'Home' },
{ href: '/', name: 'Home' },
{ href: '/radical-collaboration/donate', name: 'Donate' },
];

Expand Down
4 changes: 2 additions & 2 deletions src/pages/Faq/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const Faq = () => {
);

const breadCrumbLinks = [
{ name: 'Home', href: '/home' },
{ name: 'FAQ', href: '/about/faq' },
{ href: '/', name: 'Home' },
{ href: '/about/faq', name: 'FAQ' },
];

const getFaqData = async (currentQuery, resetState) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/HowToAdd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const HowToAdd = () => {
const clipboard = useClipboard();
const classes = useStyles();
const breadCrumbLinks = [
{ href: '/home', name: 'Home' },
{ href: '/', name: 'Home' },
{ href: '/join-index/how-to-add', name: 'How to Add Your Project' },
];
const copyText = (e, text) => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/IndvOrganization/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ const IndvOrgPage = ({ match }) => {
// Create the breadcrums on the Individual Organization Page
const parentOrgs = [];
const crumbs = [
{ name: 'Home', href: '/home' },
{ name: 'View Organization', href: '/organizations/all' },
{ href: '/', name: 'Home' },
{ href: '/organizations/all', name: 'View Organization' },
{
name: name,
href:
Expand Down
Loading