Skip to content

Commit

Permalink
client
Browse files Browse the repository at this point in the history
  • Loading branch information
jivakys committed Sep 5, 2023
1 parent fe6a226 commit 80282cf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 36 deletions.
7 changes: 3 additions & 4 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ import { BrowserRouter, Routes, Route } from "react-router-dom";
import "regenerator-runtime/runtime";

import Home from "./pages/Home";
import UserDashboard from "./pages/UserDashboard";
// import UserDashboard from "./pages/UserDashboard";
import "./App.css";
import SharedLayout from "./pages/SharedLayout";
import Interview from "./pages/Interview";
import ObjectiveQuestions from "./components/ObjectiveQuestions";

function App() {
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<SharedLayout />}>
<Route path="/" element={<Home />}>
<Route index path="/" element={<Home />} />
<Route path="/dashboard" element={<UserDashboard />} />
{/* <Route path="/dashboard" element={<UserDashboard />} /> */}
<Route path="/interview/:section" element={<Interview />} />
<Route path="/objective/:section" element={<ObjectiveQuestions />} />
</Route>
Expand Down
3 changes: 0 additions & 3 deletions client/src/components/InterviewComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import SpeechRecognition, {
useSpeechRecognition,
} from "react-speech-recognition";
import "../App.css";
import Countdown from "./Countdown";
import Camerafeed from "./Camerafeed";
const url = "http://localhost:3456/Openai/";
const fetchData = async (url, param) => {
const token = JSON.parse(localStorage.getItem("token"));
Expand Down Expand Up @@ -131,7 +129,6 @@ export default function InterviewComponent() {

return (
<>
{/* <ScreenShare /> */}
{loading ? (
<div>
<Rings
Expand Down
52 changes: 23 additions & 29 deletions client/src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,34 @@ import React, { useEffect, useState } from "react";
import { Link, useNavigate } from "react-router-dom";

function Home() {
// const [token, setToken] = useState(JSON.parse(localStorage.getItem("token")));
const navigate = useNavigate();
useEffect(() => {
// console.log(token);
// if (token) {
return navigate("/dashboard", { replace: true });
// }
navigate("/UserDashboard", { replace: true });
});

return (
<div className="flex flex-col justify-center items-center h-screen gap-10 ">
<div className="text-center">
<h1 className="text-5xl mb-2">
welcome to{" "}
<b className="text-6xl" style={{ color: "#7B8FA1" }}>
InterviewAI
</b>
</h1>
<p>
{" "}
<i>
Unlocking Your Potential : AI-Powered Interviews for Success
</i>{" "}
</p>
</div>
<div>
<button className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mr-2">
<Link to="/dashboard">UserDashBoard</Link>
</button>
{/* <button className="bg-teal-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded">
<Link to="/signup">Signup</Link>
</button> */}
</div>
</div>
<h1>Hello</h1>
// <div className="flex flex-col justify-center items-center h-screen gap-10 ">
// <div className="text-center">
// <h1 className="text-5xl mb-2">
// welcome to{" "}
// <b className="text-6xl" style={{ color: "#7B8FA1" }}>
// TechWhiz
// </b>
// </h1>
// <p>
// {" "}
// <i>
// Unlocking Your Potential : AI-Powered Interviews for Success
// </i>{" "}
// </p>
// </div>
// <div>
// <button className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mr-2">
// <Link to="/UserDashboard">UserDashBoard</Link>
// </button>
// </div>
// </div>
);
}

Expand Down

0 comments on commit 80282cf

Please sign in to comment.