Skip to content

Commit

Permalink
Merge pull request #46 from SIAT-Python-Project/feature/info/#44
Browse files Browse the repository at this point in the history
Feature/info/#44
  • Loading branch information
Wisdom-Kim authored Jun 24, 2024
2 parents 10a02f9 + cdb71aa commit bf3f39a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
16 changes: 14 additions & 2 deletions src/api/FetchPerson.js
Original file line number Diff line number Diff line change
Expand Up @@ -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("깃허브 주소 형식이 올바르지 않습니다.");

}

}

Expand Down
Binary file added src/assets/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/Headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default function SearchAppBar() {
/>
{groupedOptions.length > 0 ? (
<Listbox {...getListboxProps()}>
{groupedOptions.slice(0, 5).map((option, index) => (
{groupedOptions.map((option, index) => (
<li {...getOptionProps({ option, index })} key={option.name} style={{ padding: '5px' }}>
{option.name}
</li>
Expand All @@ -183,7 +183,7 @@ export default function SearchAppBar() {

{userCookie ? (
<>
<div style={{minWidth:"50px", textAlign:"center"}}>
<div style={{width:'100px', fontSize: '1rem' ,textAlign:"center"}}>
{userCookie.name}
</div>
<CustomButton variant="contained" color="neutral" onClick={logoutHandleSubmit}>
Expand Down
5 changes: 2 additions & 3 deletions src/pages/MainPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -19,7 +19,6 @@ const Title = styled.div`
function MainPage() {

const [data, setData] = useState({});

const params = useParams();
const id = params.id;

Expand All @@ -32,7 +31,7 @@ function MainPage() {
<Container component="main" maxWidth="xs" style={{textAlign:'center', fontSize:'1rem'}}>

<Title>씨앗 위키에 오신 것을 환영합니다!</Title>
<hr></hr>
<img src={MainImg} style={{width:'200px'}}></img>
<Box padding={'10px 0'}></Box>
<Title>기획 의도</Title>

Expand Down
4 changes: 0 additions & 4 deletions src/pages/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ export default function SingInPage({ data }) {
id="password"
autoComplete="current-password"
/>
{/* <FormControlLabel
control={<Checkbox value="remember" color="primary" />}
label="Remember me"
/> */}
<Button
type="submit"
fullWidth
Expand Down

0 comments on commit bf3f39a

Please sign in to comment.