Skip to content

Commit

Permalink
fix: routing error
Browse files Browse the repository at this point in the history
  • Loading branch information
DevDAN09 committed Jun 7, 2024
1 parent 7a6aa68 commit 40592cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-d
import { AuthProvider, AuthContext } from './contexts/AuthContext';
import Main from './pages/main/Main';
import Login from './pages/login/Login';
import MainHome from './pages/home/Home'
import Home from './pages/home/Home'
import VelogPage from './pages/VelogPage/VelogPage';
import './App.css';
import styled from 'styled-components';
Expand All @@ -16,7 +16,7 @@ function App() {
<Routes>
<Route path="/" element={<Suspense><Main /></Suspense>} />
<Route path="/login" element={<Login />} />
<Route path="/home" element={<MainHome />} />
<Route path="/home" element={<Home />} />
<Route path="/velog" element={<VelogPage />} />
</Routes>
</Router>
Expand Down
9 changes: 2 additions & 7 deletions src/pages/main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ function Main() {
}
];

const handleClick = () => {
handleModalOpen();
console.log("clicked!");
};

return (
<styles.Container>
<Header links={links}/>
Expand Down Expand Up @@ -125,7 +120,7 @@ function Main() {
<styles.SlidingBox
isOpen={isSlidingBoxOpen}>
<styles.CloseButton onClick={handleSlidingBoxClose}>X</styles.CloseButton>
<styles.FormContainer onSubmit={handleLogin}>
<styles.FormContainer>
<styles.LogoContainer>
<img src={logo_revert} alt="Logo" />
</styles.LogoContainer>
Expand All @@ -143,7 +138,7 @@ function Main() {
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
<styles.Button type="submit">로그인</styles.Button>
<styles.Button onClick={handleLogin}>로그인</styles.Button>
</styles.FormContainer>
</styles.SlidingBox>
</styles.Container>
Expand Down

0 comments on commit 40592cf

Please sign in to comment.