Skip to content

Commit 5dff1cc

Browse files
committed
Modify landing logic and routes
1 parent ef3c043 commit 5dff1cc

File tree

9 files changed

+386
-12
lines changed

9 files changed

+386
-12
lines changed

backend/question-service/src/controllers/questionController.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ export const createImageLink = async (
8080

8181
const uploadPromises = files.map((file) => uploadFileToFirebase(file));
8282
const imageUrls = await Promise.all(uploadPromises);
83-
console.log(imageUrls);
8483
res
8584
.status(200)
8685
.json({ message: "Images uploaded successfully", imageUrls });

frontend/package-lock.json

Lines changed: 308 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"react": "^18.3.1",
2626
"react-dom": "^18.3.1",
2727
"react-hook-form": "^7.53.0",
28+
"react-material-ui-carousel": "^3.4.2",
2829
"react-router-dom": "^6.26.2",
2930
"react-toastify": "^10.0.5",
3031
"vite-plugin-svgr": "^4.2.0"

frontend/src/App.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
import { Routes, Route } from "react-router-dom";
2-
import Layout from "./components/Layout";
2+
33
import NewQuestion from "./pages/NewQuestion";
44
import QuestionDetail from "./pages/QuestionDetail";
55
import QuestionEdit from "./pages/QuestionEdit";
66
import PageNotFound from "./pages/PageNotFound";
77
import ProfilePage from "./pages/Profile";
8-
import AuthProvider from "./contexts/AuthContext";
98
import QuestionList from "./pages/QuestionList";
9+
import Landing from "./pages/Landing";
1010
import Home from "./pages/Home";
1111
import SignUp from "./pages/SignUp";
1212
import LogIn from "./pages/LogIn";
1313
import ProtectedRoutes from "./components/ProtectedRoutes";
14+
import Layout from "./components/Layout";
15+
import AuthProvider from "./contexts/AuthContext";
1416
import ProfileContextProvider from "./contexts/ProfileContext";
1517

1618
function App() {
1719
return (
1820
<AuthProvider>
1921
<Routes>
2022
<Route path="/" element={<Layout />}>
21-
<Route index element={<Home />} />
23+
<Route index element={<Landing />} />
24+
<Route path="home" element={<ProtectedRoutes />}>
25+
<Route index element={<Home />} />
26+
</Route>
2227
<Route path="questions">
2328
<Route index element={<QuestionList />} />
2429
<Route path=":questionId" element={<QuestionDetail />} />

0 commit comments

Comments
 (0)