Skip to content

Commit

Permalink
fix: #181 ProductPage 헤더 HeaderBasicNav로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Oh5Yeonju committed Oct 10, 2023
1 parent b7dab10 commit 8ec1348
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/pages/ProductPage/ProductPage.jsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
import React, { useState, useEffect } from 'react';
import axios from 'axios';
import styled from 'styled-components';
import Input from '../../components/common/Input/Input';
import { useNavigate } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import BodyGlobal from '../../styles/BodyGlobal';
import authAtom from '../../atom/authToken';

import FileUploadInput from '../../components/common/Input/FileUploadInput';
import { HeaderUploadNav } from '../../components/common/Header/Header';
import { HeaderBasicNav } from '../../components/common/Header/Header';
import Layout from '../../styles/Layout';

import useFetchToken from "../../Hooks/UseFetchToken";
export default function ProductPage() {
const user = 'nigonego';
const navigate = useNavigate();

const [itemName, setItemName] = useState('');
const [price, setPrice] = useState('');
const [link, setLink] = useState('');
const [itemImage, setItemImage] = useState('');

const auth = useRecoilValue(authAtom);
const { postJoinImage, postProductUpload } = useFetchToken();

const [isFormValid, setIsFormValid] = useState(false);
// const [isBtnActive, setIsBtnActive] = useState(Boolean(false));

useEffect(() => {
if (itemName && price && link && itemImage) {
setIsFormValid(true);
// setIsBtnActive(Boolean(true))
}
}, [itemName, price, link, itemImage]);

Expand All @@ -57,7 +51,7 @@ export default function ProductPage() {
return (
<Layout>
<form onSubmit={handleSubmit}>
<HeaderUploadNav content="업로드" isFormValid={isFormValid} />
<HeaderBasicNav disabled={!isFormValid}>업로드</HeaderBasicNav>

<ul>
<li>
Expand Down

0 comments on commit 8ec1348

Please sign in to comment.