Skip to content

Commit

Permalink
Add back buttons to several pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dinoboy197 committed Aug 20, 2024
1 parent e994f71 commit 29d7a2f
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/components/censusmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { TiInputChecked } from "react-icons/ti";
import ProgressBar from "./ProgressBar";
import InfoPopup from "./InfoPopup";
import CensusMapInfo from "./CensusMapInfo";
import { IoMdArrowBack } from "react-icons/io";

interface LayerEventTarget {
feature: {
Expand Down Expand Up @@ -129,6 +130,17 @@ const CensusTractMap: NextPage = () => {
/>
{censusTractComplete ? (
<div className="mb-5 mt-6 flex items-center">
<Link href={{ pathname: "./" }}>
<button
className="mb-1 flex flex-row items-center justify-center gap-1
rounded-full bg-white/70 px-4
py-1 text-lg text-blue-darker no-underline shadow-xl transition ease-in-out
hover:translate-y-1 hover:bg-white"
>
<IoMdArrowBack />
Go back to main page
</button>
</Link>
<h1 className="mb-2 mr-5 flex flex-row items-center justify-center gap-1 font-thin text-white">
<TiInputChecked className="text-2xl text-yellowGreen " />
<strong>{`You selected track ${String(
Expand Down
2 changes: 1 addition & 1 deletion src/components/selectedzipcode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function SelectedZipCode({
>
{" "}
<IoMdArrowBack />
Re-enter zip code
Re-enter ZIP Code
</button>
<Link href={{ pathname: "./survey" }}>
<button
Expand Down
22 changes: 22 additions & 0 deletions src/components/survey/demographicssurvey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import SurveyQuestion from "./surveyquestion";
import { api } from "../../utils/api";
import Link from "next/link";
import { TiInputChecked } from "react-icons/ti";
import { IoMdArrowBack } from "react-icons/io";
import ProgressBar from "../ProgressBar";

export interface SurveyData {
Expand Down Expand Up @@ -158,6 +159,15 @@ export default function DemographicsSurvey() {
start the last part of the HIERR survey.
</h2>
<div className="flex flex-row items-center justify-center gap-5">
<Link href={{ pathname: "./zipcode" }}>
<button
className="mb-1 mt-4 rounded-full bg-white/80 px-6 py-2 text-blue-darker no-underline
transition hover:translate-y-1 hover:bg-white hover:text-blue-darker "
>
<IoMdArrowBack />
Go back to ZIP Code entry
</button>
</Link>
<button
className="mb-1 mt-4 rounded-full bg-white/80 px-6 py-2 text-blue-darker no-underline
transition hover:translate-y-1 hover:bg-white hover:text-blue-darker "
Expand Down Expand Up @@ -212,6 +222,18 @@ export default function DemographicsSurvey() {
diversity of our community. This helps us make sure that we hear
from as many different perspectives as possible during our process.
</p>

<Link href={{ pathname: "./zipcode" }}>
<button
className="mb-1 flex flex-row items-center justify-center gap-1
rounded-full bg-white/70 px-4
py-1 text-lg text-blue-darker no-underline shadow-xl transition ease-in-out
hover:translate-y-1 hover:bg-white"
>
<IoMdArrowBack />
Go back to ZIP Code entry
</button>
</Link>
</>
)}
</div>
Expand Down
14 changes: 14 additions & 0 deletions src/components/zipcode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { useForm } from "react-hook-form";
import stateZipCodes from "../data/2020_Zip_Code_Data.json";
import { GrLinkNext } from "react-icons/gr";
import { BiError } from "react-icons/bi";
import { IoMdArrowBack } from "react-icons/io";
import ProgressBar from "./ProgressBar";
import Link from "next/link";

interface ZipCodeData {
zipCode: string;
}
Expand Down Expand Up @@ -111,6 +114,17 @@ const ZipCode: NextPage = () => {
Submit <GrLinkNext />
</button>
</form>
<Link href={{ pathname: "./censusmap" }}>
<button
className="mb-1 flex flex-row items-center justify-center gap-1
rounded-full bg-white/70 px-4
py-1 text-lg text-blue-darker no-underline shadow-xl transition ease-in-out
hover:translate-y-1 hover:bg-white"
>
<IoMdArrowBack />
Go back to Census Tract selection
</button>
</Link>
<p
className="mx-auto mt-4 w-[80%] border border-dashed border-white p-1
text-center text-sm text-white md:m-4 md:w-1/2 md:p-4 xl:w-1/3 2xl:text-lg "
Expand Down
13 changes: 13 additions & 0 deletions src/pages/polis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ProgressBar from "../components/ProgressBar";
import Link from "next/link";
import { api } from "../utils/api";
import { useEffect, useState } from "react";
import { IoMdArrowBack } from "react-icons/io";

interface PolisSurvey {
id: string;
Expand Down Expand Up @@ -55,6 +56,18 @@ const Polis: NextPage = () => {
</div>
);
})}
<br />
<br />
<hr />
<Link href={{ pathname: "./survey" }}>
<button
className="mb-1 mt-4 rounded-full bg-white/80 px-6 py-2 text-blue-darker no-underline
transition hover:translate-y-1 hover:bg-white hover:text-blue-darker "
>
<IoMdArrowBack />
Go back to Demographic Survey
</button>
</Link>
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/polissurvey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Link from "next/link";
import ProgressBar from "../components/ProgressBar";
import LoggedInAs from "./loggedinas";
import { useSession } from "next-auth/react";
import { IoMdArrowBack } from "react-icons/io";

const PolisSurvey: NextPage = () => {
const router = useRouter();
Expand Down Expand Up @@ -58,6 +59,7 @@ const PolisSurvey: NextPage = () => {
className="rounded-full bg-white/90 px-10 py-2 text-blue-default no-underline transition hover:bg-white hover:text-blue-darker"
>
{" "}
<IoMdArrowBack />
Return to polis survey selection
</Link>
</div>
Expand Down

0 comments on commit 29d7a2f

Please sign in to comment.