diff --git a/src/api/FetchPerson.js b/src/api/FetchPerson.js index 2ce5fce..bcaba03 100644 --- a/src/api/FetchPerson.js +++ b/src/api/FetchPerson.js @@ -39,13 +39,25 @@ export async function createPersonProfile(createdContent, imgFile) { const profileInfoJSON = JSON.stringify(createdContent); formData.append('person', new Blob([profileInfoJSON], { type: 'application/json' })); + + try{ const response = await axios.post('/api/person' , formData , { headers: { 'Content-Type': 'multipart/form-data' } } ); - + + const regexp = /^https:\/\/github\.com\//; const userInfo = await response.data; - return userInfo; + if (!regexp.test(response.data.github)) { + throw Error("깃허브 주소 형식이 올바르지 않아요") + }else{ + return userInfo + } +} catch(error){ + document.location.href='/person/creation'; + alert("깃허브 주소 형식이 올바르지 않습니다."); + +} } diff --git a/src/assets/main.png b/src/assets/main.png new file mode 100644 index 0000000..38690c4 Binary files /dev/null and b/src/assets/main.png differ diff --git a/src/components/Headers.js b/src/components/Headers.js index ee63dbd..bf31037 100644 --- a/src/components/Headers.js +++ b/src/components/Headers.js @@ -169,7 +169,7 @@ export default function SearchAppBar() { /> {groupedOptions.length > 0 ? ( - {groupedOptions.slice(0, 5).map((option, index) => ( + {groupedOptions.map((option, index) => (
  • {option.name}
  • @@ -183,7 +183,7 @@ export default function SearchAppBar() { {userCookie ? ( <> -
    +
    {userCookie.name}
    diff --git a/src/pages/MainPage.js b/src/pages/MainPage.js index 59e7e24..7c6c27f 100644 --- a/src/pages/MainPage.js +++ b/src/pages/MainPage.js @@ -3,7 +3,7 @@ import styled from 'styled-components'; import { useNavigate, useParams } from 'react-router-dom'; import { Box, Button, Container } from '@mui/material'; import BaseComponent from '../components/BaseComponents'; - +import MainImg from '../assets/main.png'; const WrapperContainer = styled.div` height:100vh; display:flex; @@ -19,7 +19,6 @@ const Title = styled.div` function MainPage() { const [data, setData] = useState({}); - const params = useParams(); const id = params.id; @@ -32,7 +31,7 @@ function MainPage() { 씨앗 위키에 오신 것을 환영합니다! -
    + 기획 의도 diff --git a/src/pages/SignInPage.js b/src/pages/SignInPage.js index 5865ee5..3f69214 100644 --- a/src/pages/SignInPage.js +++ b/src/pages/SignInPage.js @@ -88,10 +88,6 @@ export default function SingInPage({ data }) { id="password" autoComplete="current-password" /> - {/* } - label="Remember me" - /> */}