Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
6 changes: 1 addition & 5 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Merriweather:ital@1&family=Montserrat&family=Prompt&family=Sacramento&display=swap" rel="stylesheet">
<title>Peetcode</title>
</head>
<body>
<div id="root"></div>
Expand Down
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "leet-code-frontend",
"private": true,
"proxy": "http://localhost:3000",
"version": "0.0.0",
"type": "module",
"scripts": {
Expand Down
44 changes: 8 additions & 36 deletions client/src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
/*
font-family: 'Merriweather', serif;
font-family: 'Montserrat', sans-serif;
font-family: 'Prompt', sans-serif;
font-family: 'Sacramento', cursive;
*/

h1 , h2 , h3 , h4 , h5 , h6 {
font-family: 'Montserrat', sans-serif;
font-weight: 900;
}
p , a {
font-family: 'Prompt', sans-serif
}

.flex-row {
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
}

.flex-col {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}

.logo {
width: 40px;
height: 40px;
}

a , Link {
text-decoration: none;
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}

body {
background-color: #eceff1;
}
87 changes: 60 additions & 27 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,65 @@
import { BrowserRouter , Routes , Route } from "react-router-dom";

import HomePage from "./Components/HomePage/HomePage"
import AllProblems from "./Components/AllProblems/AllProblems";

import Navbar from "./Constants/Navbar/Navbar"
import ProblemsPage from "./Components/ProblemsPage/ProblemsPage";
import Signup from "./Components/Signup/Signup"
import Login from "./Components/Login/Login"
import "./App.css"
import { BrowserRouter, Routes, Route } from "react-router-dom";
import "./App.css";
import Login from "./pages/Login/Login";
import Signup from "./pages/Signup/Signup";
import ProblemList from "./pages/ProblemList/ProblemList";
import Problem from "./pages/Problem/Problem";
import Navbar from "./pages/Navbar/Navbar";
/*
* Temporary problems array schema
*/
const problems = [
{
title: "201. Bitwise AND of Numbers Range",
difficulty: "Medium",
acceptance: "42%",
description: "Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive.",
example: "Input: left = 5, right = 7 Output: 4"
},
{
title: "201. Bitwise AND of Numbers Range",
difficulty: "Medium",
acceptance: "412%",
description: "Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive.",
example: "Input: left = 5, right = 7 Output: 4"
},
{
title: "202. Happy Number",
difficulty: "Easy",
acceptance: "54.9%",
description: "Write an algorithm to determine if a number n is happy. A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits. Repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy. Return true if n is a happy number, and false if not.",
example: "Input: n = 19 Output: true Explanation: 12 + 92 = 82 82 + 22 = 68 62 + 82 = 100 12 + 02 + 02 = 1"
},
{
title: "203. Remove Linked List Elements",
difficulty: "Hard",
acceptance: "42%",
description: "Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head.",
example: "Input: head = [1,2,6,3,4,5,6], val = 6 Output: [1,2,3,4,5]"
},
];

function App() {
/* Add routing here, routes look like -
/login - Login page
/signup - Signup page
/problemset/all/ - All problems (see problems array above)
/problems/:problem_slug - A single problem page
*/

return (
<BrowserRouter>
<Navbar />
<Routes>
<Route path="/" element={<HomePage />} />
<Route path="/signup" element={<Signup />} />
<Route path="/login" element={<Login />} />
<Route path="/problemset/all/" element={<AllProblems />} />
<Route path="/problems/:pid/" element={<ProblemsPage />} />
<Route path="*" element={<div>404 Not Found</div>} />
</Routes>
</BrowserRouter>
// <div>
// Finish the assignment! Look at the comments in App.jsx as a starting point
// </div>
)
return (
<div>
<BrowserRouter>
<Navbar />
<Routes>
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<Signup />} />
<Route path="/problemset/all" element={<ProblemList problems={problems} />} />
<Route path="/problems/:problem_slug" element={<Problem problems={problems} />} />
</Routes>
</BrowserRouter>
</div>
);
}

export default App
export default App;
37 changes: 0 additions & 37 deletions client/src/Components/AllProblems/AllProblems.css

This file was deleted.

50 changes: 0 additions & 50 deletions client/src/Components/AllProblems/AllProblems.jsx

This file was deleted.

17 changes: 0 additions & 17 deletions client/src/Components/HomePage/HomePage.css

This file was deleted.

21 changes: 0 additions & 21 deletions client/src/Components/HomePage/HomePage.jsx

This file was deleted.

39 changes: 0 additions & 39 deletions client/src/Components/HomePage/LoremPosts.js

This file was deleted.

3 changes: 0 additions & 3 deletions client/src/Components/Login/Login.css

This file was deleted.

Loading