Skip to content

Commit

Permalink
refactor: move context to its own directy
Browse files Browse the repository at this point in the history
  • Loading branch information
6lr61 committed Sep 10, 2024
1 parent 143b60d commit 5a3eb85
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from "react";
import "./App.css";
import { AuthStateContext } from "./contexts/AuthStateContext";
import { AuthStateContext } from "./contexts/auth-state/AuthStateContext";
import LoginButton from "./components/LoginButton";

export default function App() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoginButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useContext } from "react";
import { AuthStateContext } from "../contexts/AuthStateContext";
import { AuthStateContext } from "../contexts/auth-state/AuthStateContext";

export default function LoginButton(): React.ReactElement {
const context = useContext(AuthStateContext);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback, useEffect, useState } from "react";
import { useLocalStorage } from "../hooks/useLocalStorage";
import { validateToken } from "../utils/validateToken";
import { OAuthMessage } from "../callback";
import { revokeToken } from "../utils/revokeToken";
import { useLocalStorage } from "../../hooks/useLocalStorage";
import { validateToken } from "../../utils/validateToken";
import { OAuthMessage } from "../../callback";
import { revokeToken } from "../../utils/revokeToken";
import { type AuthState, AuthStateContext } from "./AuthStateContext";

const OAUTH2_URL = "https://id.twitch.tv/oauth2/authorize";
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import "./index.css";
import AuthStateProvider from "./contexts/AuthStateProvider.tsx";
import AuthStateProvider from "./contexts/auth-state/AuthStateProvider.tsx";

const rootElement = document.querySelector("#root");

Expand Down

0 comments on commit 5a3eb85

Please sign in to comment.