-
Notifications
You must be signed in to change notification settings - Fork 2
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
14 changed files
with
126 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import axios from "axios"; | ||
|
||
export const axiosInstance = axios.create({ | ||
baseURL: `http://${process.env.REACT_APP_ENDPOINT}`, | ||
timeout: 20000, | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,8 +1,10 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import axios from "axios"; | ||
import App from "./App"; | ||
|
||
import "./styles/global.css"; | ||
|
||
axios.defaults.withCredentials = true; | ||
const root = ReactDOM.createRoot(document.getElementById("root")); | ||
root.render(<App />); |
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,7 +1,48 @@ | ||
import React from "react"; | ||
import React, { useState } from "react"; | ||
import { SnowAnimation, SideMenu, LoginModal } from "../../components"; | ||
import { | ||
Background, | ||
MainImage, | ||
SnowmanImage, | ||
MainLogo, | ||
StartButton, | ||
Container, | ||
MenuImage, | ||
} from "./styled"; | ||
import main from "../../assets/images/main.png"; | ||
import logo from "../../assets/images/main_logo.png"; | ||
import snowman from "../../assets/images/snowman.png"; | ||
import menu from "../../assets/images/menu.png"; | ||
|
||
const Main = () => { | ||
return <>Main</>; | ||
const [isMenuVisible, setIsMenuVisible] = useState(false); | ||
const [isLoginVisible, setIsLoginVisible] = useState(false); | ||
|
||
const handleStartButtonClick = () => { | ||
setIsLoginVisible(!isLoginVisible); | ||
}; | ||
|
||
const handleMenuClick = () => { | ||
setIsMenuVisible(!isMenuVisible); | ||
}; | ||
|
||
return ( | ||
<> | ||
<Background /> | ||
<SnowAnimation /> | ||
<MenuImage src={menu} alt="menu" onClick={handleMenuClick} /> | ||
<MainLogo src={logo} alt="logo" /> | ||
<MainImage src={main} alt="main" /> | ||
<SnowmanImage src={snowman} alt="snowman" /> | ||
<Container> | ||
<StartButton onClick={handleStartButtonClick}> | ||
서비스 시작하기 | ||
</StartButton> | ||
</Container> | ||
{isMenuVisible && <SideMenu onClose={handleMenuClick} />} | ||
{isLoginVisible && <LoginModal />} | ||
</> | ||
); | ||
}; | ||
|
||
export default Main; |
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,6 +1,60 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Background = styled.div` | ||
background: #102531; | ||
width: 100vw; | ||
height: 84vh; | ||
position: fixed; | ||
z-index: -2; | ||
`; | ||
|
||
export const MainImage = styled.img` | ||
position: fixed; | ||
width: 100vw; | ||
height: auto; | ||
bottom: 15vh; | ||
z-index: -1; | ||
`; | ||
|
||
export const MenuImage = styled.img` | ||
position: fixed; | ||
width: 10vw; | ||
height: auto; | ||
top: 1vh; | ||
right: 3vw; | ||
z-index: 0; | ||
`; | ||
|
||
export const MainLogo = styled.img` | ||
position: fixed; | ||
top: 10vh; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
z-index: -1; | ||
`; | ||
|
||
export const SnowmanImage = styled.img` | ||
position: fixed; | ||
top: 25vh; | ||
left: 20%; | ||
z-index: -1; | ||
`; | ||
|
||
export const StartButton = styled.button` | ||
background: white; | ||
width: 85vw; | ||
height: 8vh; | ||
border-radius: 15px; | ||
box-shadow: 0px 0px 8px 5px rgba(16, 37, 49, 0.5); | ||
font-size: 1.2rem; | ||
font-weight: bold; | ||
`; | ||
|
||
export const Container = styled.div` | ||
width: 100vw; | ||
height: 100vh; | ||
height: 95vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: flex-end; | ||
`; |
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