Skip to content

Commit

Permalink
gggg
Browse files Browse the repository at this point in the history
  • Loading branch information
W47-KRTS committed Sep 13, 2024
1 parent 0c2fb03 commit ac29542
Show file tree
Hide file tree
Showing 7 changed files with 3,446 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm fund
node_modules
14 changes: 7 additions & 7 deletions frontend-react-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend-react-js/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Amplify.configure({
// identityPoolId: process.env.REACT_APP_IDENTITY_POOL_ID, // REQUIRED - Amazon Cognito Identity Pool ID
region: process.env.REACT_AWS_PROJECT_REGION, // REQUIRED - Amazon Cognito Region
userPoolId: process.env.REACT_APP_AWS_USER_POOLS_ID, // OPTIONAL - Amazon Cognito User Pool ID
userPoolWebClientId: process.env.REACT_APP_AWS_USER_POOLS_WEB_CLIENT_ID, // OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
userPoolWebClientId: process.env.REACT_APP_CLIENT_ID, // OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
}
});

Expand Down
16 changes: 7 additions & 9 deletions frontend-react-js/src/components/ProfileInfo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './ProfileInfo.css';
import {ReactComponent as ElipsesIcon} from './svg/elipses.svg';
import React from "react";
import { Auth } from 'aws-amplify';

// [TODO] Authenication
import Cookies from 'js-cookie'
Expand All @@ -13,15 +14,12 @@ export default function ProfileInfo(props) {
}

const signOut = async () => {
console.log('signOut')
// [TODO] Authenication
Cookies.remove('user.logged_in')
//Cookies.remove('user.name')
//Cookies.remove('user.username')
//Cookies.remove('user.email')
//Cookies.remove('user.password')
//Cookies.remove('user.confirmation_code')
window.location.href = "/"
try {
await Auth.signOut({ global: true });
window.location.href = "/"
} catch (error) {
console.log('error signing out: ', error);
}
}

const classes = () => {
Expand Down
4 changes: 2 additions & 2 deletions frontend-react-js/src/pages/HomeFeedPage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import './HomeFeedPage.css';
import React from "react";

import { Auth } from 'aws-amplify';
import './configureAmplify';
import { Auth, Hub, signIn, signOut} from 'aws-amplify/auth';

import DesktopNavigation from '../components/DesktopNavigation';
import DesktopSidebar from '../components/DesktopSidebar';
Expand Down
Loading

0 comments on commit ac29542

Please sign in to comment.