Skip to content

Commit

Permalink
Fix up buttons/links for disabled javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
davepeck committed Jan 25, 2024
1 parent 7adc480 commit 537d668
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 29 deletions.
44 changes: 20 additions & 24 deletions src/components/More.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,13 @@ const SELECTION_DESCRIPTION: {
</div>
<p className="py-8">Put some explanatory text here.</p>
{bestRegistrationUrl(homeSt) && (
<button
className="bg-black py-4 px-8 text-white text-xl font-bold hover:bg-red-500"
onClick={() => {
window.open(bestRegistrationUrl(homeSt)!, "_blank");
}}
<a
className="inline-block g-black py-4 px-8 text-white text-xl font-bold hover:bg-red-500"
href={bestRegistrationUrl(homeSt)!}
target="_blank"
>
Register to vote
</button>
</a>
)}
</div>
),
Expand All @@ -112,14 +111,13 @@ const SELECTION_DESCRIPTION: {
</div>
<p className="py-8">Put some explanatory text here.</p>
{bestRegistrationUrl(schoolSt) && (
<button
className="bg-black py-4 px-8 text-white text-xl font-bold hover:bg-red-500"
onClick={() => {
window.open(bestRegistrationUrl(schoolSt)!, "_blank");
}}
<a
className="inline-block bg-black py-4 px-8 text-white text-xl font-bold hover:bg-red-500"
href={bestRegistrationUrl(schoolSt)!}
target="_blank"
>
Register to vote
</button>
</a>
)}
</div>
),
Expand All @@ -132,24 +130,22 @@ const SELECTION_DESCRIPTION: {
</div>
<p className="py-8">Put some explanatory text here.</p>
{bestRegistrationUrl(homeSt) && (
<button
className="bg-black mb-8 py-4 px-8 text-white text-xl font-bold hover:bg-red-500"
onClick={() => {
window.open(bestRegistrationUrl(homeSt)!, "_blank");
}}
<a
className="inline-block bg-black mb-8 py-4 px-8 text-white text-xl font-bold hover:bg-red-500"
href={bestRegistrationUrl(homeSt)!}
target="_blank"
>
Register to vote in {US_STATES[homeSt]}
</button>
</a>
)}{" "}
{bestRegistrationUrl(schoolSt) && (
<button
className="bg-black py-4 px-8 text-white text-xl font-bold hover:bg-red-500"
onClick={() => {
window.open(bestRegistrationUrl(schoolSt)!, "_blank");
}}
<a
className="inline-block bg-black py-4 px-8 text-white text-xl font-bold hover:bg-red-500"
href={bestRegistrationUrl(schoolSt)!}
target="_blank"
>
Register to vote in {US_STATES[schoolSt]}
</button>
</a>
)}
</div>
),
Expand Down
7 changes: 2 additions & 5 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ const { title } = Astro.props;
<html lang="en" class="bg-darkest text-medium scroll-smooth">
<head>
<!-- Google tag (gtag.js) -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-XKE8361DZ1"
onerror="window.ga_loaded=false"
onload="window.ga_loaded=true"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XKE8361DZ1"
></script>
<script>
// @ts-nocheck
window.dataLayer = window.dataLayer || [];
Expand Down

0 comments on commit 537d668

Please sign in to comment.