Skip to content
3 changes: 3 additions & 0 deletions weather/src/components/NavBar.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// 네비게이션 바
// 홈버튼이랑 되돌아가기 버튼 구현

import { IoIosArrowBack } from "react-icons/io";
import { IoIosHome } from "react-icons/io";

Expand Down
2 changes: 2 additions & 0 deletions weather/src/components/ProtectedRoute.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// 로그인한 사용자만 접근할수 있게 페이지 보호기능

import React, { Children } from "react";
import { Navigate } from "react-router";
import useAuthStore from "../store/authStore";
Expand Down
2 changes: 2 additions & 0 deletions weather/src/components/button.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//공통된 버튼 요소

import React from "react";

const Button = ({ onClick,children,style}) =>{
Expand Down
2 changes: 1 addition & 1 deletion weather/src/pages/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useAuthStore from "../store/authStore"; //로그인 상태를 관리하
import { useForm } from "react-hook-form";


//로그인 page 화면 구현
//로그인 페이지 화면 구현
const LoginPage = () => {
const navigate = useNavigate();
const { validateID, validatePassword } = useLoginValidation();
Expand Down
2 changes: 1 addition & 1 deletion weather/src/pages/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import Button from "../components/button"; //공통된 요소 버튼 사용
import { useNavigate } from "react-router"; //페이지 이동을 위한 useNavigate 훅 사용

//main page 화면 구현
//메인페이지 화면 구현
const Mainpage = () => {
const navigate = useNavigate(); //useNavigate 훅을 사용하여 페이지 이동 기능을 활성화
return (
Expand Down
1 change: 1 addition & 0 deletions weather/src/pages/map.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//날씨 지도 부분 구현
import React, {useState} from 'react'
import { useForm} from 'react-hook-form'

Expand Down
3 changes: 2 additions & 1 deletion weather/src/pages/signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useForm } from "react-hook-form";
import { useLoginValidation } from "../hooks/useLoginValidation";


//회원가입 page 화면 구현
//회원가입 페이지 화면 구현
const SignupPage = () => {
const navigate = useNavigate();
const { validateID, validatePassword } = useLoginValidation();
Expand All @@ -16,6 +16,7 @@ const SignupPage = () => {
alert("회원가입 되었습니다.");
navigate('/login'); // 회원가입 후 로그인 페이지로 이동
};
//회원가입 저장가능하도록 코드 변경 에정

//비밀번호 일치했을때, 확인용 값
const password=watch("password");
Expand Down
3 changes: 2 additions & 1 deletion weather/src/pages/sub.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import React from "react";
import Button from "../components/button"; //공통된 요소 버튼 사용
import { useNavigate } from "react-router"; //페이지 이동을 위한 useNavigate 훅 사용

//sub page 화면 구현
//서브페이지 화면 구현
// 날씨 지도랑 목록으로 이동할수 있게하는 페이지
const Subpage = () => {
const navigate = useNavigate(); //useNavigate 훅을 사용하여 페이지 이동 기능을 활성화

Expand Down
2 changes: 1 addition & 1 deletion weather/src/store/authStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const useAuthStore = create((set) => ({
isLoggedIn: true,
user: userData,
})),
//로그아웃 처리하는 함수
//로그아웃 처리하는 함수입니다
logout: () =>
set(()=>({
isLoggedIn: false,
Expand Down
13 changes: 13 additions & 0 deletions weather/src/utils/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//사용가능한 API 요청 코드 담는 파일

//import axios from 'axios';

const API_BASE_URL = ''; // 백엔드 주소에 맞게 수정하는것

//로그인 API

//회원가입 API

//날씨 API

//백언드가 다른 포트라면 설정바꿀수 있게 해야됨됨
3 changes: 2 additions & 1 deletion weather/src/utils/paths.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.