-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not sync judge results with firebase (#166)
* do not sync judge results with firebase this takes up too much space: roughly 3GB for 350k files. we should figure out a better way to do this later. * oops * skip sync output test
- Loading branch information
1 parent
5d21574
commit 3ba21cb
Showing
8 changed files
with
50 additions
and
35 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
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { createContext, useContext, useState } from 'react'; | ||
import JudgeResult from '../types/judge'; | ||
|
||
const JudgeResultsContext = createContext< | ||
[(JudgeResult | null)[], (newResults: (JudgeResult | null)[]) => void] | null | ||
>(null); | ||
|
||
export default function useJudgeResults() { | ||
const context = useContext(JudgeResultsContext); | ||
if (context === null) { | ||
throw new Error( | ||
'useJudgeResults must be used within an JudgeResultsProvider' | ||
); | ||
} | ||
|
||
return context; | ||
} | ||
|
||
export function JudgeResultsProvider({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const state = useState<(JudgeResult | null)[]>([]); | ||
return ( | ||
<JudgeResultsContext.Provider value={state}> | ||
{children} | ||
</JudgeResultsContext.Provider> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.