-
Notifications
You must be signed in to change notification settings - Fork 159
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
61 changed files
with
408 additions
and
343 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 |
---|---|---|
@@ -1,5 +0,0 @@ | ||
import { AuthManager } from '@/lib/auth'; | ||
import { createContext, useContext } from 'react'; | ||
|
||
const AuthContext = createContext(new AuthManager()); | ||
export const useAuthManager = () => useContext(AuthContext); | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { AuthManager } from '@/lib/auth'; | ||
import { EditorEngine } from '@/lib/editor/engine'; | ||
import { ProjectsManager } from '@/lib/projects'; | ||
import { RouteManager } from '@/lib/routes'; | ||
import { createContext, useContext } from 'react'; | ||
|
||
const authManager = new AuthManager(); | ||
const routeManager = new RouteManager(); | ||
const projectsManager = new ProjectsManager(); | ||
const editorEngine = new EditorEngine(projectsManager); | ||
|
||
const AuthContext = createContext(authManager); | ||
const RouteContext = createContext(routeManager); | ||
const ProjectsContext = createContext(projectsManager); | ||
const EditorEngineContext = createContext(editorEngine); | ||
|
||
export const useAuthManager = () => useContext(AuthContext); | ||
export const useRouteManager = () => useContext(RouteContext); | ||
export const useProjectsManager = () => useContext(ProjectsContext); | ||
export const useEditorEngine = () => useContext(EditorEngineContext); |
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
Oops, something went wrong.