Skip to content

Commit

Permalink
prettier cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCLo committed May 10, 2020
1 parent b0735c0 commit 28eb222
Show file tree
Hide file tree
Showing 73 changed files with 4,789 additions and 4,374 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all"
"trailingComma": "all",
"tabWidth":4,
}
204 changes: 102 additions & 102 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,111 +39,111 @@ import TestPage from './components/pages/Test';
import Scanner from './components/components/Scanner';

const App = () => {
// Modals --------------------------------------------------//
$('body').on('click', '#privacy-policy', () => {
$('#modal-privacy-policy').modal('show');
});
$('body').on('click', '#show-registration', () => {
$('#modal-register-notice').modal('show');
});
$('body').on('click', '#show-feedback', () => {
$('#modal-feedback').modal('show');
});
$('body').on('click', '#show-register-notifications', () => {
$('#modal-register-notifications').modal('show');
});
// Modals --------------------------------------------------//
$('body').on('click', '#privacy-policy', () => {
$('#modal-privacy-policy').modal('show');
});
$('body').on('click', '#show-registration', () => {
$('#modal-register-notice').modal('show');
});
$('body').on('click', '#show-feedback', () => {
$('#modal-feedback').modal('show');
});
$('body').on('click', '#show-register-notifications', () => {
$('#modal-register-notifications').modal('show');
});

// Forms (Need refactor) --------------------------------------------------//
// Forms (Need refactor) --------------------------------------------------//

$('body').on('click', '#notify-submit', (e) => {
e.preventDefault();
if ($('#notify-agree').prop('checked') === true) {
$('#notify-submit').addClass('btn-loading');
controller.create_user({
phone: $('#notify-phone').val(),
button_id: '#notify-submit',
});
} else {
$('#notify-warning').removeClass('d-none');
}
});
$('body').on('click', '#notify-submit', (e) => {
e.preventDefault();
if ($('#notify-agree').prop('checked') === true) {
$('#notify-submit').addClass('btn-loading');
controller.create_user({
phone: $('#notify-phone').val(),
button_id: '#notify-submit',
});
} else {
$('#notify-warning').removeClass('d-none');
}
});

return (
<>
<div id="app">
<div className="page">
<Primary />
<Secondary />
<Router>
<Switch>
<Route path="/about">
<AboutUsPage />
</Route>
<Route path="/individual">
<IndividualsLandingPage />
</Route>
<Route path="/community">
<CommunityPage />
</Route>
<Route path="/businesses">
<BusinessLandingPage />
</Route>
<Route path="/testing">
<TestingsiteLandingPage />
</Route>
<Route path="/notifications">
<NotificationsPage />
</Route>
<Route path="/privacy-policy">
<PrivacyPage />
</Route>
<Route path="/privacy">
<PrivacyLandingPage />
</Route>
<Route path="/terms">
<TermsPage />
</Route>
<Route path="/feedback">
<FeedbackPage />
</Route>
<Route path="/contact">
<ContactPage />
</Route>
<Route path="/volunteer">
<VolunteerLandingPage />
</Route>
<Route path="/team">
<OurTeamPage />
</Route>
<Route path="/scan">
<ScanPage />
</Route>
<Route path="/business/register">
<BusinessRegisterPage />
</Route>
<Route path="/healthcare/register">
<HealthCareRegisterPage />
</Route>
<Route path="/s/:sdvid" component={Scanner} />
<Route path="/test">
<TestPage />
</Route>
<Route exact path="/">
<HomePage />
</Route>
<Route component={NotFoundPage} />
</Switch>
</Router>
</div>
<Footer />
</div>
<RegisterModal />
<ScanStatusModal />
<FeedbackModal />
<RegisterNotificationsModal />
<PrivacyPolicyModal />
</>
);
return (
<>
<div id="app">
<div className="page">
<Primary />
<Secondary />
<Router>
<Switch>
<Route path="/about">
<AboutUsPage />
</Route>
<Route path="/individual">
<IndividualsLandingPage />
</Route>
<Route path="/community">
<CommunityPage />
</Route>
<Route path="/businesses">
<BusinessLandingPage />
</Route>
<Route path="/testing">
<TestingsiteLandingPage />
</Route>
<Route path="/notifications">
<NotificationsPage />
</Route>
<Route path="/privacy-policy">
<PrivacyPage />
</Route>
<Route path="/privacy">
<PrivacyLandingPage />
</Route>
<Route path="/terms">
<TermsPage />
</Route>
<Route path="/feedback">
<FeedbackPage />
</Route>
<Route path="/contact">
<ContactPage />
</Route>
<Route path="/volunteer">
<VolunteerLandingPage />
</Route>
<Route path="/team">
<OurTeamPage />
</Route>
<Route path="/scan">
<ScanPage />
</Route>
<Route path="/business/register">
<BusinessRegisterPage />
</Route>
<Route path="/healthcare/register">
<HealthCareRegisterPage />
</Route>
<Route path="/s/:sdvid" component={Scanner} />
<Route path="/test">
<TestPage />
</Route>
<Route exact path="/">
<HomePage />
</Route>
<Route component={NotFoundPage} />
</Switch>
</Router>
</div>
<Footer />
</div>
<RegisterModal />
<ScanStatusModal />
<FeedbackModal />
<RegisterNotificationsModal />
<PrivacyPolicyModal />
</>
);
};

export default App;
6 changes: 3 additions & 3 deletions src/components/components/Code.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react';
import template from '../../templates/components/code.pug';

class Code extends React.Component {
render() {
return template.call(this, {});
}
render() {
return template.call(this, {});
}
}

export default Code;
6 changes: 3 additions & 3 deletions src/components/components/CodeAlt.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react';
import template from '../../templates/components/code-alt.pug';

class CodeAlt extends React.Component {
render() {
return template.call(this, {});
}
render() {
return template.call(this, {});
}
}

export default CodeAlt;
Loading

0 comments on commit 28eb222

Please sign in to comment.