-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
3,083 additions
and
2,255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true, es6: true, node: true, }, | ||
env: { browser: true, es2020: true, es6: true, node: true }, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
|
||
], | ||
ignorePatterns: ["dist", ".eslintrc.cjs"], | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["react-refresh"], | ||
rules: { | ||
"indent": ["error", 2], | ||
indent: ["error", 2], | ||
"linebreak-style": ["error", "unix"], // Use Unix line endings | ||
"quotes": ["error", "double"], // Use single quotes | ||
"semi": ["error", "always"], // Require semicolons at the end of statements | ||
quotes: ["error", "double"], // Use single quotes | ||
semi: ["error", "always"], // Require semicolons at the end of statements | ||
"no-console": "off", // You can disable this rule if you want to allow console.log | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
|
||
"style": "new-york", | ||
"rsc": true, | ||
"tsx": true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image" href="/UNO.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<!-- <script src="https://cdn.tailwindcss.com"></script> --> | ||
<title>CSLC Tutoring Portal</title> | ||
</head> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image" href="/UNO.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<!-- <script src="https://cdn.tailwindcss.com"></script> --> | ||
<title>CSLC Tutoring Portal</title> | ||
</head> | ||
|
||
<body class="overscroll-none"> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
|
||
</html> | ||
<body class="overscroll-none"> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Axios from "axios"; | ||
|
||
export const axios_base = Axios.create({ | ||
baseURL: "http://localhost:6969/api/", | ||
}); | ||
baseURL: "http://localhost:6969/api/", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import axios from "axios" | ||
import axios from "axios"; | ||
import { keepPreviousData, useQuery } from "@tanstack/react-query"; | ||
|
||
export default function useFetchCourse() { | ||
async function getCourse() { | ||
const { data } = await axios.get('http://localhost:6969/api/courses/') | ||
return data | ||
} | ||
const data = useQuery({ | ||
queryKey: ["courses"], | ||
queryFn: () => getCourse(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}) | ||
if (data) { | ||
return data | ||
} | ||
} | ||
async function getCourse() { | ||
const { data } = await axios.get("http://localhost:6969/api/courses/"); | ||
return data; | ||
} | ||
const data = useQuery({ | ||
queryKey: ["courses"], | ||
queryFn: () => getCourse(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}); | ||
if (data) { | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import axios from "axios" | ||
import axios from "axios"; | ||
import { keepPreviousData, useQuery } from "@tanstack/react-query"; | ||
|
||
export default function useFetchIssue() { | ||
async function getIssue() { | ||
const { data } = await axios.get('http://localhost:6969/api/issues/') | ||
return data | ||
} | ||
const data = useQuery({ | ||
queryKey: ["issues"], | ||
queryFn: () => getIssue(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}) | ||
if (data) { | ||
return data | ||
} | ||
} | ||
async function getIssue() { | ||
const { data } = await axios.get("http://localhost:6969/api/issues/"); | ||
return data; | ||
} | ||
const data = useQuery({ | ||
queryKey: ["issues"], | ||
queryFn: () => getIssue(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}); | ||
if (data) { | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import axios from "axios" | ||
import axios from "axios"; | ||
import { keepPreviousData, useQuery } from "@tanstack/react-query"; | ||
|
||
export default function useFetchProfessor() { | ||
async function getProfessors() { | ||
const { data } = await axios.get('http://localhost:6969/api/professors/') | ||
return data | ||
} | ||
const data = useQuery({ | ||
queryKey: ["professors"], | ||
queryFn: () => getProfessors(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}) | ||
if (data) { | ||
return data | ||
} | ||
} | ||
async function getProfessors() { | ||
const { data } = await axios.get("http://localhost:6969/api/professors/"); | ||
return data; | ||
} | ||
const data = useQuery({ | ||
queryKey: ["professors"], | ||
queryFn: () => getProfessors(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}); | ||
if (data) { | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import axios from "axios" | ||
import axios from "axios"; | ||
import { keepPreviousData, useQuery } from "@tanstack/react-query"; | ||
|
||
export default function useFetchSection() { | ||
async function getSection() { | ||
const { data } = await axios.get('http://localhost:6969/api/sections/') | ||
return data | ||
} | ||
const data = useQuery({ | ||
queryKey: ["sections"], | ||
queryFn: () => getSection(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}) | ||
if (data) { | ||
return data | ||
} | ||
} | ||
async function getSection() { | ||
const { data } = await axios.get("http://localhost:6969/api/sections/"); | ||
return data; | ||
} | ||
const data = useQuery({ | ||
queryKey: ["sections"], | ||
queryFn: () => getSection(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}); | ||
if (data) { | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import axios from "axios" | ||
import axios from "axios"; | ||
import { keepPreviousData, useQuery } from "@tanstack/react-query"; | ||
|
||
export default function useFetchTicket() { | ||
async function getTicket() { | ||
const { data } = await axios.get('http://localhost:6969/api/tickets/') | ||
return data | ||
} | ||
const data = useQuery({ | ||
queryKey: ["tickets"], | ||
queryFn: () => getTicket(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}) | ||
if (data) { | ||
return data | ||
} | ||
} | ||
async function getTicket() { | ||
const { data } = await axios.get("http://localhost:6969/api/tickets/"); | ||
return data; | ||
} | ||
const data = useQuery({ | ||
queryKey: ["tickets"], | ||
queryFn: () => getTicket(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}); | ||
if (data) { | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import axios from "axios" | ||
import axios from "axios"; | ||
import { keepPreviousData, useQuery } from "@tanstack/react-query"; | ||
|
||
export default function useFetchTutor() { | ||
async function getTutors() { | ||
const { data } = await axios.get('http://localhost:6969/api/tutors/') | ||
return data | ||
} | ||
const data = useQuery({ | ||
queryKey: ["tutors"], | ||
queryFn: () => getTutors(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}) | ||
if (data) { | ||
return data | ||
} | ||
} | ||
async function getTutors() { | ||
const { data } = await axios.get("http://localhost:6969/api/tutors/"); | ||
return data; | ||
} | ||
const data = useQuery({ | ||
queryKey: ["tutors"], | ||
queryFn: () => getTutors(), | ||
placeholderData: keepPreviousData, | ||
staleTime: 30000, | ||
}); | ||
if (data) { | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
export default function ClockIcon() { | ||
return ( | ||
<svg xmlns="http://www.w3.org/2000/svg" className="stroke-foreground" width="20" height="20" viewBox="0 0 24 24" strokeWidth="1.5" fill="none" strokeLinecap="round" strokeLinejoin="round"> | ||
<path stroke="none" d="M0 0h24v24H0z" fill="none" /> | ||
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /> | ||
<path d="M12 12h-3.5" /> | ||
<path d="M12 7v5" /> | ||
</svg> | ||
) | ||
} | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
className="stroke-foreground" | ||
width="20" | ||
height="20" | ||
viewBox="0 0 24 24" | ||
strokeWidth="1.5" | ||
fill="none" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
> | ||
<path stroke="none" d="M0 0h24v24H0z" fill="none" /> | ||
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /> | ||
<path d="M12 12h-3.5" /> | ||
<path d="M12 7v5" /> | ||
</svg> | ||
); | ||
} |
Oops, something went wrong.