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

Add back buttons to several pages #217

Merged
merged 7 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
7 changes: 7 additions & 0 deletions src/components/AddressSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ProgressBar from "./ProgressBar";
import * as ELG from "esri-leaflet-geocoder";
import Link from "next/link";
import { GrLinkNext } from "react-icons/gr";
import { IoMdArrowBack } from "react-icons/io";
import { api } from "../utils/api";

declare global {
Expand Down Expand Up @@ -297,6 +298,12 @@ const AddressSearch: React.FC = () => {
)}
</div>
<div className="flex flex-row items-center justify-center gap-5">
<Link href={{ pathname: "./" }}>
<button className="mb-1 mt-4 flex flex-row items-center justify-center 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 />
Homepage
</button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's change this to Home instead of Homepage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

</Link>
<Link href={{ pathname: "./survey" }}>
<button
className="mb-1 mt-4 flex flex-row items-center justify-center gap-1 rounded-full border-2
Expand Down
18 changes: 16 additions & 2 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,8 +159,14 @@ 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: "./address" }}>
<button className="mb-1 mt-4 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 Address entry
</button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's say "Re-enter Address"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

</Link>
<button
className="mb-1 mt-4 rounded-full bg-white/80 px-6 py-2 text-blue-darker no-underline
className="mb-1 mt-4 flex flex-row items-center justify-center 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 "
onClick={() => handleRetakeSurvey()}
>
Expand All @@ -168,7 +175,7 @@ export default function DemographicsSurvey() {
<Link href={{ pathname: "./polis" }}>
<button
className="mb-1 mt-4 flex flex-row items-center justify-center gap-1 rounded-full border-2
border-dashed border-lightGreen bg-yellowGreen px-6 py-1 text-right text-lg text-blue-darker no-underline shadow-xl transition ease-in-out
border-dashed border-lightGreen bg-yellowGreen px-6 py-1 text-right text-lg text-blue-darker no-underline shadow-xl transition ease-in-out
hover:translate-y-1 hover:bg-lightGreen"
onClick={() => handleSubmit()}
>
Expand Down Expand Up @@ -212,6 +219,13 @@ 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: "./address" }}>
<button className="mb-1 mt-4 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 Address entry
</button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I missed this one. "Re-enter Address"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

</Link>
</>
)}
</div>
Expand Down
10 changes: 10 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,15 @@ const Polis: NextPage = () => {
</div>
);
})}
<br />
<br />
<hr />
<Link href={{ pathname: "./survey" }}>
<button className="mb-1 mt-4 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 Demographic Survey
</button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's say Retake Demographic Survey

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

</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>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we're updating the names, this might be better as "Select New Polis Survey"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

</div>
Expand Down
Loading