Skip to content

Commit

Permalink
Fix : Router [#7]
Browse files Browse the repository at this point in the history
  • Loading branch information
sbyeol3 committed Jul 22, 2020
1 parent ef5cbde commit cf7cca9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
7 changes: 4 additions & 3 deletions src/components/common/Footer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import styled from 'styled-components';
import {Link} from 'react-router-dom';

const Bottom = styled.bottom`
const Bottom = styled.div`
width: 90%;
resize: none;
border: none;
Expand All @@ -10,8 +11,8 @@ height: 300px;

const Footer = () => (
<Bottom>
<link to>따미 소개</link>|<link to>이용약관</link>|<link to>개인정보 처리방침</link>|
<link to>자주 묻는 질문</link>|<link to>고객센터</link>|<link to>재휴 문의</link>|
<Link to='/'>따미 소개</Link>|<Link to='/'>이용약관</Link>|<Link to='/'>개인정보 처리방침</Link>|
<Link to='/'>자주 묻는 질문</Link>|<Link to='/'>고객센터</Link>|<Link to='/'>재휴 문의</Link>|
copyRight DDami Inc. All Rights Reserved
</Bottom>
)
Expand Down
5 changes: 0 additions & 5 deletions src/components/workplace/index.js

This file was deleted.

11 changes: 6 additions & 5 deletions src/pages/WorkplacePage.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from "react";
import { Route } from "react-router-dom";
import Workplace from '../components/workplace';
import Write from '../components/workplace/Write';

const WorkplacePage = (props) => {
// const { match } = props
// const { path } = match

const WorkplacePage = ({history}) => {
console.log(history)
console.log(Workplace)
return(
<>
<Route exact path='/write' component={WorkplacePage.Write}/>
<Route exact path='/workplace/write' component={Write}/>
</>
)
}
Expand Down
5 changes: 4 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from "react";
import { Route } from "react-router-dom";
import Main from "./Main";
import Write from "../components/workplace/Write";
import WorkplacePage from "./WorkplacePage";
import Footer from "../components/common/Footer";

export default (props) => (
<>
<Route exact path='/' component={Main} />
<Route exact path='/workplace' component={WorkplacePage}/>
<Route path='/workplace' component={WorkplacePage}/>
<Footer/>
</>
)

0 comments on commit cf7cca9

Please sign in to comment.