-
Notifications
You must be signed in to change notification settings - Fork 26
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
Standalone page #893
Merged
Merged
Standalone page #893
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c0fd662
fix broken pw reset request with token
austensen 693762d
add standalone page, start transitioning over
austensen 1473e03
add login success step, mobile standalone styles, footer
austensen 8d2ffa0
fix footer alignment, and page scrolling on mobile
austensen b5358cd
fix desktop styles, add link to JF logo
austensen 751c500
Merge branch 'email-alerts-account-signup' into standalone-page
austensen 77a1bd0
remove unused prop for redirects
austensen a9c0bdd
fix spacing for JF logo on standalone page
austensen e19ff74
use wow-body-standard mixin for email/pw labels
austensen f3d999f
remove SendNewLink props now set by default
austensen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React, { SVGProps } from "react"; | ||
|
||
export const JFLogo = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg | ||
width="96" | ||
height="22" | ||
viewBox="0 0 96 22" | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<path | ||
d="M4.8626 15.8124C4.8626 17.6707 4.05216 18.8277 2.1366 18.8277C1.39984 18.8277 1.03146 18.7926 0.331541 18.6524L0 21.5624C0.84727 21.7027 1.58403 21.7728 2.61549 21.7728C6.5203 21.7728 8.25168 19.3536 8.25168 15.8826V0.455792H4.8626V15.8124Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M23.1845 21.4923H26.3894V5.11889H23.1845V14.8307C23.1845 17.5655 21.4163 19.1082 18.4693 19.1082C15.3749 19.1082 14.3434 17.0746 14.3434 14.8307V5.11889H11.1386V15.6021C11.1386 19.1082 12.6857 21.913 17.1431 21.913C20.1638 21.913 22.4109 20.4054 23.1477 17.0746H23.1845V21.4923Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M36.1592 21.913C40.8008 21.913 43.0111 19.9496 43.0111 16.9695C43.0111 14.4451 41.2797 12.8323 36.5644 12.0609C33.028 11.5 32.1439 10.6585 32.1439 9.29113C32.1439 7.92376 33.2859 7.08229 35.4593 7.08229C37.7433 7.08229 38.8852 8.064 39.5115 10.5183L42.569 9.81704C41.7954 6.6265 39.8798 4.69816 35.4593 4.69816C31.1493 4.69816 28.939 6.6265 28.939 9.46643C28.939 12.0259 30.5967 13.5686 35.1278 14.375C38.8115 14.971 39.843 15.6722 39.843 17.0396C39.8062 18.5472 38.6274 19.4938 36.1961 19.4938C32.9543 19.4938 31.7755 17.846 31.1861 15.6021L28.1654 16.1631C28.9022 19.564 30.8177 21.913 36.1592 21.913Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M46.1377 16.6189C46.1377 19.6691 47.7217 21.913 51.3318 21.913C52.9158 21.913 53.8368 21.7027 55.0156 21.3521L54.6104 18.5472C53.6894 18.7926 52.9158 18.9679 51.9949 18.9679C50.0793 18.9679 49.3426 18.0213 49.3426 16.1981V7.74845H54.8314V5.11889H49.3426V0.596035H46.1377V5.11889H43.5959V7.74845H46.1377V16.6189Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M70.2788 12.8323V9.78198H60.1484V3.50609H71.4945V0.455792H56.7593V21.4923H60.1484V12.8323H70.2788Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M77.8197 2.5945V0H74.1727V2.5945H77.8197ZM77.5618 21.4923V5.11889H74.3937V21.4923H77.5618Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M92.2794 21.4923H96V21.4222L90.1059 13.4283L95.8526 5.18901V5.11889H92.3531L87.7852 12.096L83.1068 5.11889H79.3861V5.18901L85.1697 13.0777L79.2756 21.4222V21.4923H82.8857L87.4536 14.41L92.2794 21.4923Z" | ||
fill="currentColor" | ||
/> | ||
</svg> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import React from "react"; | ||
import classNames from "classnames"; | ||
import { withI18n, withI18nProps } from "@lingui/react"; | ||
import { Link as JFCLLink } from "@justfixnyc/component-library"; | ||
|
||
import "styles/StandalonePage.css"; | ||
import Page from "./Page"; | ||
import { createWhoOwnsWhatRoutePaths } from "routes"; | ||
import { JFCLLocaleLink, LocaleLink } from "i18n"; | ||
import { Trans } from "@lingui/macro"; | ||
import { JFLogo } from "./JFLogo"; | ||
|
||
export const StandalonePageFooter = () => { | ||
const { home } = createWhoOwnsWhatRoutePaths(); | ||
return ( | ||
<Trans render="div" className="wow-footer"> | ||
<JFCLLocaleLink to={home}>Who Owns What</JFCLLocaleLink> by JustFix. | ||
<br /> | ||
Read our{" "} | ||
<JFCLLink | ||
href="https://www.justfix.org/en/privacy-policy/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Privacy Policy | ||
</JFCLLink>{" "} | ||
and{" "} | ||
<JFCLLink | ||
href="https://www.justfix.org/en/terms-of-use/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Terms of Service | ||
</JFCLLink> | ||
</Trans> | ||
); | ||
}; | ||
|
||
type StandalonePageProps = withI18nProps & { | ||
title: string; | ||
className: string; | ||
children: React.ReactNode; | ||
}; | ||
|
||
const StandalonePage = withI18n()((props: StandalonePageProps) => { | ||
const { title, className, children } = props; | ||
const { home } = createWhoOwnsWhatRoutePaths(); | ||
return ( | ||
<Page title={title}> | ||
<div className={classNames("StandalonePage Page", className)}> | ||
<div className="page-container"> | ||
<LocaleLink className="jf-logo" to={home}> | ||
<JFLogo /> | ||
</LocaleLink> | ||
<div className="standalone-container">{children}</div> | ||
<StandalonePageFooter /> | ||
</div> | ||
</div> | ||
</Page> | ||
); | ||
}); | ||
|
||
export default StandalonePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't feel like a great way to do this, would be curious what you think. I don't like this sometimes returning
null
for the component, but I couldn't put this logic in the parent component because it doesn't have the ability to get pathname from theuseLocation
hook.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm i hear ya. i can't think of a better way to do this logically but there is a way to avoid returning a null, like so. tried it locally and it works!