Skip to content

Commit

Permalink
continuing to overhaul signup flow
Browse files Browse the repository at this point in the history
  • Loading branch information
NorthCountryEngineer committed Mar 23, 2024
1 parent 92c4aa9 commit 136b938
Show file tree
Hide file tree
Showing 18 changed files with 350 additions and 551 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// This is sample code. Please update this to suite your schema

/**
* @type {import('@types/aws-lambda').APIGatewayProxyHandler}
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"modules": "add-to-group,custom",
"modules": "add-to-group",
"resourceName": "nceed07f38101PostConfirmation"
}

This file was deleted.

4 changes: 2 additions & 2 deletions amplify/team-provider-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"nceed07f38101PostConfirmation": {
"GROUP": "Students",
"deploymentBucketName": "amplify-nceed-dev-60353-deployment",
"s3Key": "amplify-builds/nceed07f38101PostConfirmation-524a74497a78586a4b65-build.zip",
"s3Key": "amplify-builds/nceed07f38101PostConfirmation-4c6b4b6c50704b7a482b-build.zip",
"apiNceedGraphqlapikeyoutputProd": "f",
"apiNceedGraphqlapikeyoutputDev": "f"
},
Expand All @@ -87,7 +87,7 @@
},
"graphQlLambdaAuthorizer09c68778": {
"deploymentBucketName": "amplify-nceed-dev-60353-deployment",
"s3Key": "amplify-builds/graphQlLambdaAuthorizer09c68778-776a5254737a334a3068-build.zip"
"s3Key": "amplify-builds/graphQlLambdaAuthorizer09c68778-4e71746a6c307a776e4b-build.zip"
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions pages/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { MobileSignUp, WebSignUp } from '@/src/components/SignUp'
* ensuring that already logged-in users do not access the sign-up form.
*
* The component renders different UIs based on the screen size, providing tailored experiences for mobile
* and web users. The sign-up process involves multiple steps, including birthday, name, location, and email
* and web users. The sign-up process involves multiple steps, including name, location, and email
* entry, each managed through individual tabs. It incorporates two-factor authentication and integrates
* with AWS Amplify's signUp service.
*
Expand All @@ -25,14 +25,14 @@ import { MobileSignUp, WebSignUp } from '@/src/components/SignUp'
* @returns {JSX.Element} - The SignUp component renders either a mobile or web version of the sign-up form,
* or redirects the user if already logged in.
*/
const SignUp = ({ loggedIn, isMobile, router }: any) =>{
const SignUp = ({ isMobile }: any) =>{

//punt user if they're already logged in
/**punt user if they're already logged in
useEffect(() => {
if (loggedIn) {
router.push('/')
}
}, [loggedIn, router])
}, [loggedIn, router])**/

return isMobile ? <MobileSignUp /> : <WebSignUp />
}
Expand Down
10 changes: 6 additions & 4 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ const NCE_Education_App = ({ Component, pageProps }:any) => {
useEffect(()=>{
const avatarUrlResponse = async() => {
try{
const currentUser = await getCurrentUser();
const avatarFileName = `avatars/${currentUser.userId}/avatar.png`;
let presignedUrlResponse = await getPresignedUrl(avatarFileName)
setAvatarUrl(presignedUrlResponse)
const currentUser = null//await getCurrentUser();
if(currentUser){
const avatarFileName = `avatars/${currentUser.userId}/avatar.png`;
let presignedUrlResponse = await getPresignedUrl(avatarFileName)
setAvatarUrl(presignedUrlResponse)
}
}catch(error){
console.error("Error with presignedUrlResponse call in app.tsx: ", error)
return
Expand Down
9 changes: 4 additions & 5 deletions src/components/Header/HeaderComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export const UserAccountButtons_Web = ({ avatarUrl }: any) => {
onClose={handleNotificationsClose}
sx={{width: 300}}
>
{notifications.map((notification:any, index) => (
{/*notifications.map((notification:any, index) => (
<MenuItem
key={index}
sx={{
Expand All @@ -298,13 +298,12 @@ export const UserAccountButtons_Web = ({ avatarUrl }: any) => {
}}>
{notification.message}
</Typography>
{/*<Typography component="p" variant="body2" style={{ color: 'gray' }}>
{<Typography component="p" variant="body2" style={{ color: 'gray' }}>
{formatDistanceToNow(new Date(notification.createdAt), { addSuffix: true })}
</Typography>*/}
</Typography>
</Box>
</MenuItem>
))}

))}*/}
</Menu>

<IconButton
Expand Down
4 changes: 0 additions & 4 deletions src/components/LogIn/LogIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ const LogInForm = ({loggedIn}:any) => {
}
}

if (loggedIn) {
router.push("/StudentProfile")
}

return(
<Grid container spacing={2} direction="column">
<Grid item>
Expand Down
Loading

0 comments on commit 136b938

Please sign in to comment.