Skip to content

Commit

Permalink
redirect home to browse page
Browse files Browse the repository at this point in the history
  • Loading branch information
GayChin committed Apr 23, 2024
1 parent b62c221 commit 142c734
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 59 deletions.
60 changes: 3 additions & 57 deletions app/components/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,12 @@ import { setActiveItem, setUserId } from '@/redux/features/userSlice';
import { useAppDispatch, useAppSelector } from '@/redux/hooks';
import { useSession } from 'next-auth/react';
import { useEffect } from 'react';
import { redirect } from 'next/navigation';

const Demo = () => {
// const dispatch = useAppDispatch();
// const sessionProfile: Profile = useAppSelector(
// (state) => state.profileReducer.sessionProfile
// );
// console.log('session profile ', sessionProfile);
// const { data: session } = useSession();
// const controller = new AbortController();
redirect('/browse');

// // fetch user's profile and store in redux state
// useEffect(() => {
// if (session) {
// console.log('userid: ' + session.user.id);
// dispatch(setUserId(session.user.id));
// // fetch profile only once upon logging in and reaching home page
// if (Object.keys(sessionProfile).length === 0) {
// console.log('fetching profile');
// dispatch(
// getProfileByUserId({ controller, userId: Number(session.user.id) })
// );
// }
// }
// return () => {
// controller.abort();
// };
// }, [session]);

return (
<>
<div className='demo-container'>
<div className='input-group'>
<label htmlFor='tb_demo_1'>Username</label>
<input id='tb_demo_1' />
</div>
<div className='input-group'>
<label htmlFor='tb_demo_2'>Password</label>
<input id='tb_demo_2' type='password' />
</div>
<div className='input-group'>
<input id='tb_demo_3' placeholder='Placeholder' />
</div>
<div className='input-group top-label'>
<label htmlFor='tb_demo_4'>Top Label</label>
<input id='tb_demo_4' />
</div>
<div>
<button className='btn'>Button</button>
</div>
<div>
<button className='btn btn-primary'>Button</button>
<button className='btn btn-primary btn-solid'>Solid</button>
</div>
<div>
<button className='btn btn-secondary'>Button</button>
<button className='btn btn-secondary btn-solid'>Solid</button>
</div>
</div>
</>
);
return <></>;
};

export default Demo;
2 changes: 1 addition & 1 deletion app/components/register-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const RegisterCard = () => {
<div className='login-register-image-logo-container'>
<img
className='login-register-image-logo'
src='https://i.pinimg.com/736x/df/3e/2f/df3e2ff88a1453362c743b01dd8fb2f8.jpg'
src='https://cdn-icons-png.flaticon.com/512/3939/3939748.png'
></img>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/login/login-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const LoginCard = () => {
<div className='login-register-image-logo-container'>
<img
className='login-register-image-logo'
src='https://1409791524.rsc.cdn77.org/data/images/full/654186/le-sserafim-chaewon.jpg?w=600?w=430'
src='https://cdn-icons-png.flaticon.com/512/3939/3939748.png'
></img>
</div>

Expand Down

0 comments on commit 142c734

Please sign in to comment.