Skip to content

Commit

Permalink
Merge branch 'main' of github.com:GDSC-MACE/Girlathon23
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav-18max committed Feb 4, 2024
2 parents 7e0b3eb + 4352161 commit 49b3f1d
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 43 deletions.
14 changes: 8 additions & 6 deletions src/components/IdeaSubmission/IdeaSubmission.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default function IdeaSubmission() {
const [teamname,setTeamname]=useState('')

const [datafetched,setDataFetched]=useState(false)
const logOut=async()=>{
const res=await axios.get(`${API}/auth/logout`,{withCredentials:true})
}

const getter=async()=>{
const res=await axios.get(`${API}/auth/profile`,{withCredentials:true})
Expand Down Expand Up @@ -62,8 +65,8 @@ console.log(res)

return (datafetched?
<section className="IdeaSubmission" style={{ paddingTop: "6rem" }}>
<h2>Idea Submission</h2>
<div className="SubmissionContent">
<h2 data-aos-duration="1300" data-aos-once="true">Idea Submission</h2>
<div className="SubmissionContent" data-aos-duration="1300" data-aos-once="true">
<div className="IdeaTeamDetails">
<div style={{ width: "80%", height: "80%" }}>
<div class="idea-card">
Expand Down Expand Up @@ -142,7 +145,7 @@ console.log(res)
</option>
</select>
<textarea
placeholder="Idea Description"
placeholder="short idea Description"
type="text"
className="input textarea"
value={description}
Expand Down Expand Up @@ -174,12 +177,11 @@ console.log(res)
</form>) :(<h1>Idea submitted</h1>)}

<div style={{ paddingTop: "1rem" }}>
<NavLink to="/resetPassword">
<u style={{ color: "orange" }}> reset password</u>
</NavLink><br>
<br>
</br>
<button style={{ background:'none',border:'none' }} onClick={()=>{
dispatch(loggedOut())
logOut()
}}>logout</button>
</div>
</div>
Expand Down
25 changes: 14 additions & 11 deletions src/components/Navbar/navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function Navbar() {
<div>
<section className="navigation row">

<NavLink to='/' className="logo col" style={{height:'2rem',display:'flex',alignItems:'center' }}><img src="/images/GDSC.png" style={{ height:'190%' }} alt="" /></NavLink >
<NavLink to='/' className="logo col" style={{height:'2rem',display:'flex',alignItems:'center' }}><img src="/images/GDSC.png" style={{ height:'190%' }} alt="" /></NavLink>


<div className="navigation-links col">
Expand Down Expand Up @@ -105,25 +105,25 @@ export default function Navbar() {
Contact
</li>
</a>
<Link to="/Signin" onClick={()=>{
<NavLink to="/Signin" onClick={()=>{
document.getElementById('hero-nav').style.display='block'
document.getElementById('hero-nav').classList.remove('link-active')
document.getElementById('hero-a').style.display='none'

// console.log("Jithin")
} }> <li className="register">
Register
</li></Link>
</li></NavLink>
</ul>
</div>
</section>
<div className="navigation-mobile-menu">
<div
<NavLink to='/'
className="logo col"
style={{ height: "2rem", display: "flex", alignItems: "center" }}
>
<img src="/images/GDSC.png" style={{ height: "190%" }} alt="" />
</div>
</NavLink>
<i
className={`bi bi-list list${Nav ? "nav-active" : ""}`}
onClick={setNavigation}
Expand All @@ -140,21 +140,21 @@ export default function Navbar() {
>
<ul>
<li
id="hero-a"
id="hero-amob"
className={`lin`}
>
<a href="#HERO">Home</a>
</li>
<li
id="hero-nav"
id="hero-navmob"
style={{ display: "none" }}
className={`lin`}
>
<NavLink
to="/"
onClick={() => {
document.getElementById("hero-nav").style.display = "none";
document.getElementById("hero-a").style.display = "block";
document.getElementById("hero-navmob").style.display = "none";
document.getElementById("hero-amob").style.display = "block";
}}
>
Home
Expand All @@ -180,11 +180,14 @@ export default function Navbar() {
Contact
</a>
</li>
{/* <li className="register">
<li className="register" onClick={()=>{
document.getElementById("hero-navmob").style.display = "block";
document.getElementById("hero-amob").style.display = "none";
}}>
<Link to="/Signin" onClick={setNavigation}>
Register
</Link>
</li> */}
</li>
</ul>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SIgnIn/resetpass.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function ResetPass(){
password:newPass
}

console.log(res)

dispatch(loggedOut())
navigate('/Signin')
}
Expand Down
18 changes: 9 additions & 9 deletions src/components/SIgnIn/signin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { loggedIn, teamRegistered } from "../../redux/action";
import { redirect, useNavigate } from "react-router-dom";
import DashInd from "../dash/dashInd";
import { Alert } from "react-bootstrap";


import Loader from "../loader/loader";

export default function Signin() {
Expand Down Expand Up @@ -41,7 +41,7 @@ export default function Signin() {
setDataFetched(true);
});
if (res != null) setDataFetched(true);
console.log(res);


if (res.status === 201) {
dispatch(loggedIn());
Expand All @@ -50,7 +50,7 @@ export default function Signin() {

if (res.data.user.team != null) {
dispatch(teamRegistered(res.data.user.team));
console.log(isTeamRegistered);

}
};

Expand Down Expand Up @@ -84,7 +84,7 @@ export default function Signin() {
});

if (response != null) setDataFetched(true);
console.log(response);

if (response.status == 230) {
alert("This email already exists");
setState(true);
Expand All @@ -98,15 +98,15 @@ export default function Signin() {
withCredentials: true,
});
navigate("/dash");
console.log("hello");

}

console.log(response);

};

const login = (
<div className="section login">
<div className="form-container">
<div className="form-container" style={{ maxWidth:'50rem' }}>
<p className="title">Login</p>
<form className="form" onSubmit={loginEvent}>
<div className="input-group">
Expand Down Expand Up @@ -194,7 +194,7 @@ export default function Signin() {
);
const register = (
<div className="section login">
<div className="form-container">
<div className="form-container" style={{ maxWidth:'50rem' }}>
<p className="title">Register</p>
<form className="form" onSubmit={registerEvent}>
<div className="input-group">
Expand Down
33 changes: 17 additions & 16 deletions src/components/dash/dashInd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function DashInd()
const [count,setCount]=useState(0)
const [team,setTeam]=useState(true)
const [mate,setMate]=useState(false)
const [teamname,setTeamname]=useState('team name not set!')
const [teamname,setTeamname]=useState('')
const [teammatename,setTeammatename]=useState('')
const [teammateemail,setTeammateemail]=useState('')
const [teammatenum,setTeammatenum]=useState('')
Expand All @@ -42,7 +42,7 @@ export default function DashInd()
setDataFetched(true)
setLead(res.data.lead)
setteammates(res.data.members)
console.log(res)

if(res.data.lead.idea)
{
const idea=document.getElementById('idea-status')
Expand Down Expand Up @@ -77,7 +77,7 @@ export default function DashInd()
team:teamname
}
const res = await axios.post(`${API}/team/member-register`,data,{withCredentials:true})
console.log(res)


if(teammates.length==3)
setCount(5)
Expand All @@ -95,7 +95,7 @@ export default function DashInd()
team:teamname
}
const res = await axios.post(`${API}/team/team-assign`,data,{withCredentials:true})
console.log(res)

if(res.status==200)
{
setTeam(false)
Expand All @@ -110,22 +110,23 @@ export default function DashInd()
<h1 style={{ paddingTop:'5rem',paddingLeft:'3rem',color:'rgb(103, 225, 255)' }} className='fade-up dash-heading'
data-aos="zoom-out-up" data-aos-duration="1300" data-aos-once="true">Welcome {lead.name}</h1>
<h3 style={{paddingLeft:'3rem',color:' rgb(103, 225, 255)' }} className='fade-up dash-heading'
data-aos="zoom-out-up" data-aos-duration="1300" data-aos-once="true">{teamname}</h3>
data-aos="zoom-out-up" data-aos-duration="1300" data-aos-once="true">{teamname==''?'team not registered':teamname}</h3>
{dashDone&&<p style={{paddingLeft:'3rem',color:'rgb(103, 225, 255)' }}>team full</p>}
<p id='idea-status' style={{ paddingTop:'.5rem',paddingLeft:'3rem',color:'orange' }}>idea not sumbitted</p>
<div className='dashContainer' >
<p id='idea-status' style={{ paddingTop:'.5rem',paddingLeft:'3rem',color:'orange' }}
data-aos-duration="1300" data-aos-once="true">idea not sumbitted</p>
<div className='dashContainer' data-aos-duration="1300" data-aos-once="true">
{!dashDone &&(
<div className='dash-left' >
{team &&(
<>
<h3>Guidelines</h3>
<ol>
<li style={{ paddingTop:'.5rem' }}>jvxzss cgvd d sb dns dns dns dn dnbzs nddsn zdsnd dsdasdns ns dnas adn Sndnb d as dasdbas da d ad adsnbd a
fadnfnad fnbad fnb adfnb adnf adnf adsn asnd adnbfd adnbf adbnf adbn fnbad fbnad fbnd fbd fbnda f</li>
<li style={{ paddingTop:'.5rem' }}>jvxzss cgvd d sb dns dns dns dn dnbzs nddsn zdsnd dsdasdns ns dnas adn Sndnb d as dasdbas da d ad adsnbd a
fadnfnad fnbad fnb adfnb adnf adnf adsn asnd adnbfd adnbf adbnf adbn fnbad fbnad fbnd fbd fbnda f</li>
<li style={{ paddingTop:'.5rem' }}>jvxzss cgvd d sb dns dns dns dn dnbzs nddsn zdsnd dsdasdns ns dnas adn Sndnb d as dasdbas da d ad adsnbd a
fadnfnad fnbad fnb adfnb adnf adnf adsn asnd adnbfd adnbf adbnf adbn fnbad fbnad fbnd fbd fbnda f</li>
<li style={{ paddingTop:'.5rem' }}>1.You can register as a team of 4 members maximum.</li>
<li style={{ paddingTop:'.5rem' }}>2.Team lead has to register first</li>
<li style={{ paddingTop:'.5rem' }}>3.After registration, team lead can add the members by the option of 'Add Member'.</li>
<li style={{ paddingTop:'.5rem' }}>4.Only team lead can enter the details of team members.</li>
<li style={{ paddingTop:'.5rem' }}>5.Ideas based on various domains of interest can be submitted as Abstract.</li>
<li style={{ paddingTop:'.5rem' }}>6.Once the abstract of your idea is submitted and all team members are added , the registration is complete.</li>
</ol>
<hr></hr>
<br></br>
Expand Down Expand Up @@ -160,7 +161,7 @@ export default function DashInd()
{
mate&&(
<form onSubmit={setTeammate} style={{ width:'45dvw',minwidth:'20rem' }}>
<h3>Enter team details</h3>
<h3>Add member</h3>
<div className='row' style={{gap:'2rem' }}>
<div className='team-mate col fade-up'
data-aos="zoom-out-up" data-aos-duration="1300" data-aos-once="true">
Expand Down Expand Up @@ -285,7 +286,7 @@ data-aos="zoom-out-up" data-aos-duration="1300" data-aos-once="true">

</div>}
{mate&&(<div className='idea-submission fade-up'
data-aos="zoom-out-up" data-aos-duration="1300" data-aos-once="true">
>
<NavLink to='/ideaSumbit' >
<button class="continue-application">
<div>
Expand All @@ -304,7 +305,7 @@ data-aos="zoom-out-up" data-aos-duration="1300" data-aos-once="true">

</NavLink>
<div style={{ paddingTop:'1rem' }}>
<NavLink to='/resetPassword'><u style={{ color:'orange' }}> reset password</u></NavLink>

<br></br>
<button style={{ background:'none',border:'none' }} onClick={()=>{
logOut();
Expand Down

0 comments on commit 49b3f1d

Please sign in to comment.