Skip to content

Commit 2a8c97e

Browse files
committed
clean up LoginPage presentation
1 parent 9f09d4e commit 2a8c97e

File tree

4 files changed

+28
-47
lines changed

4 files changed

+28
-47
lines changed

components/EditProfilePage/EditProfilePage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ import {
2525
} from "./StyledEditProfileComponents"
2626
import { TestimoniesTab } from "./TestimoniesTab"
2727
import { useFlags } from "components/featureFlags"
28-
import { PendingUpgradeBanner } from "components/PendingUpgradeBanner"
29-
3028
import LoginPage from "components/Login/login"
29+
import { PendingUpgradeBanner } from "components/PendingUpgradeBanner"
3130

3231
const tabTitle = ["about-you", "testimonies", "following"] as const
3332
export type TabTitles = (typeof tabTitle)[number]

components/Login/login.tsx

Lines changed: 26 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,36 @@
1-
import { Alert, Button, Col, Form, Modal, Stack } from "../bootstrap"
2-
import { useAppDispatch } from "../hooks"
3-
import {
4-
SignInWithButton,
5-
signOutAndRedirectToHome,
6-
useAuth
7-
} from "components/auth"
8-
import { AuthFlowStep, authStepChanged } from "components/auth/redux"
91
import { useTranslation } from "next-i18next"
10-
import { useContext, useEffect, useState } from "react"
11-
import { useNavigate } from "react-router-dom"
12-
import { useLocation } from "react-router-dom"
13-
import { useRouter } from "next/router"
2+
import styled from "styled-components"
3+
import { Container } from "../bootstrap"
4+
import { SignInWithButton } from "components/auth"
145

156
export default function LoginPage() {
167
const { t } = useTranslation("auth")
17-
// const dispatch = useAppDispatch()
18-
// const setCurrentModal = (step: AuthFlowStep) =>
19-
// dispatch(authStepChanged(step))
208

21-
// useEffect(() => {
22-
// setCurrentModal("start")
23-
// })
24-
25-
// const navigate = useNavigate()
26-
// const handleGoBack = () => {
27-
// navigate(-1) // Navigates back one entry in the history stack
28-
// }
29-
30-
const router = useRouter()
31-
32-
// const location = useLocation()
9+
const StyledContainer = styled(Container)`
10+
@media (min-width: 768px) {
11+
}
12+
`
3313

3414
return (
35-
<div>
36-
<p>Hello Login World</p>
37-
<br />
38-
<p>
39-
You were possibly signed out while trying to go to a page that needs you
40-
to be signed in
41-
</p>
42-
<br />
43-
<div>Please consider logging in first:</div>
44-
<div className="" style={{ width: "100px" }}>
45-
<SignInWithButton />
15+
<StyledContainer>
16+
<div className={`bg-white my-3 overflow-hidden rounded-3`}>
17+
<div className={`align-items-center d-flex px-2 pt-2 pb-0`}>
18+
<div className={`px-3 py-0`}>
19+
<div className={`align-items-start fs-5 lh-sm mb-1 text-secondary`}>
20+
You were possibly signed out while trying to go to a page that
21+
needs to be signed in to function
22+
</div>
23+
<br />
24+
<div className={`align-items-start fs-5 lh-sm mb-1 text-secondary`}>
25+
Please consider logging in first:
26+
</div>
27+
<div className={`justify-content-center d-flex w-100`}>
28+
<SignInWithButton />
29+
</div>
30+
<br />
31+
</div>
32+
</div>
4633
</div>
47-
<br />
48-
{/* <p>If logged in, try and provide user with link to prior navpoint</p>
49-
<p>Current Pathname: {router.pathname}</p> */}
50-
</div>
34+
</StyledContainer>
5135
)
5236
}

components/Newsfeed/Newsfeed.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ import {
1414
StyledContainer
1515
} from "./StyledNewsfeedComponents"
1616
import ProfileSettingsModal from "components/EditProfilePage/ProfileSettingsModal"
17+
import LoginPage from "components/Login/login"
1718
import { NewsfeedCard } from "components/NewsfeedCard/NewsfeedCard"
1819
import { ProfileButtons } from "components/ProfilePage/ProfileButtons"
1920

20-
import LoginPage from "components/Login/login"
21-
2221
export default function Newsfeed() {
2322
const { t } = useTranslation("common")
2423

components/auth/SignInModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useEffect } from "react"
2-
import type { ModalProps } from "react-bootstrap"
32
import { useForm } from "react-hook-form"
43
import { Alert, Button, Col, Form, Modal, Stack } from "../bootstrap"
54
import { LoadingButton } from "../buttons"

0 commit comments

Comments
 (0)