Skip to content

Commit

Permalink
Added more code
Browse files Browse the repository at this point in the history
  • Loading branch information
AydanPirani committed Feb 24, 2024
1 parent baa74a1 commit bfd83d2
Show file tree
Hide file tree
Showing 37 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/assets/hackfavicon.png" />
<link rel="icon" type="image/svg+xml" href="/public/hackfavicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChakraProvider, theme } from "@chakra-ui/react"
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom"
import { BrowserRouter, HashRouter, Navigate, Route, Routes } from "react-router-dom"

Check failure on line 2 in src/App.tsx

View workflow job for this annotation

GitHub Actions / build

'BrowserRouter' is declared but its value is never read.

import Auth from "./routes/Auth"
import Home from "./routes/Home"
Expand All @@ -8,14 +8,14 @@ import Questions from "./routes/Questions"
function App() {
return (
<ChakraProvider theme={theme}>
<BrowserRouter>
<HashRouter>
<Routes>
<Route path="/auth/" element = {<Auth />}> </Route>
<Route path="/questions/" element = {<Questions />}> </Route>
<Route path="/" element={<Home />} />
<Route path="*" element={<Navigate to="/" replace={true} />} />
</Routes>
</BrowserRouter>
</HashRouter>
</ChakraProvider>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageTooSmall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function PageTooSmall() {
</Box>
<Box w='400px' h='40px' marginBlock="100px">
<Box marginTop="6.5%" onMouseEnter={() => setHovered(true)} onMouseLeave={() => setHovered(false)}>
<Image src={`/assets/begin_${hovered ? "unhover" : "hover"}.svg`} onClick={() => {
<Image src={`/public/begin_${hovered ? "unhover" : "hover"}.svg`} onClick={() => {
window.location.href = "/auth/"
}} />
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/components/QuestionOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function QuestionOutput({ qid, answers, children, getSubmission,
<VStack>
{children}
<Box marginTop="6.5%" onMouseEnter={() => setHovered(true)} onMouseLeave={() => setHovered(false)}>
<Image src={`/assets/submit_${hovered ? "hover" : "unhover"}.svg`} onClick={() => {
<Image src={`/public/submit_${hovered ? "hover" : "unhover"}.svg`} onClick={() => {
const submission = getSubmission(answers);
handleSubmission(qid, submission);
}} />
Expand Down
2 changes: 1 addition & 1 deletion src/questions/Question5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function Question5({ data, setData }: QuestionProps) {
</InputForm>
</QuestionOutput>
</Box>
<Image src="/assets/q5_q.svg" boxSize='35vw' />
<Image src="/public/q5_q.svg" boxSize='35vw' />
</HStack>
)
};
2 changes: 1 addition & 1 deletion src/questions/Question6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Question6({data, setData}: QuestionProps) {
</InputForm>
</QuestionOutput>
</Box>
<Image src="/assets/q6_k.svg" style={{objectFit: "cover", alignSelf: "baseline", width: "35vw"}} />
<Image src="/public/q6_k.svg" style={{objectFit: "cover", alignSelf: "baseline", width: "35vw"}} />
</HStack>
)
};
2 changes: 1 addition & 1 deletion src/routes/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Home() {
</Box>
<Box w='400px' h='40px' marginBlock="100px">
<Box marginTop="6.5%" onMouseEnter={() => setHovered(true)} onMouseLeave={() => setHovered(false)}>
<Image src={`/assets/begin_${hovered ? "unhover" : "hover"}.svg`} onClick={() => {
<Image src={`/public/begin_${hovered ? "unhover" : "hover"}.svg`} onClick={() => {
window.location.href = "/auth/"
}} />
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Questions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface PuzzleData {

function createTab(idx: number, complete: boolean) {
const src = complete ? "complete.svg" : `q${idx}.svg`;
return <Tab> <Image draggable="false" minH={"100%"} src={`/assets/${src}`} /> </Tab>;
return <Tab> <Image draggable="false" minH={"100%"} src={`/public/${src}`} /> </Tab>;
}


Expand Down

0 comments on commit bfd83d2

Please sign in to comment.