Skip to content

Commit

Permalink
(#2) feat: router 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
paperdeer committed Oct 22, 2022
1 parent 58fe93c commit 2049cf9
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 21 deletions.
23 changes: 5 additions & 18 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
import Router from './Router';
import { StyledProvider } from 'aliens-design-system-front';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<StyledProvider>
<Router />
</StyledProvider>
);
}

Expand Down
13 changes: 13 additions & 0 deletions src/Router.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { Policy } from './pages/Policy';

const Router = () => {
return (
<BrowserRouter>
<Routes>
<Route path="/sign-up-policy" element={<Policy />} />
</Routes>
</BrowserRouter>
);
};
export default Router;
5 changes: 2 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
document.getElementById('root') as HTMLElement,
);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
);

// If you want to start measuring performance in your app, pass a function
Expand Down
34 changes: 34 additions & 0 deletions src/pages/Policy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import styled from 'styled-components';

export const Policy = () => {
return (
<_Wrapper>
<_PolicyContent>
당신은 회원가입 약관 동의하십니까? 당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까? 당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까? 당신은 회원가입 약관 동의하십니까?당신은 회원가입 약관
동의하십니까?당신은 회원가입 약관 동의하십니까?당신은
</_PolicyContent>
</_Wrapper>
);
};

const _Wrapper = styled.section`
width: 100%;
`;

const _PolicyContent = styled.strong`
font-size: ${({ theme }) => theme.textFont.xs.size}px;
font-weight: ${({ theme }) => theme.textFont.xs.weight};
color: ${({ theme }) => theme.color.gray5};
`;

0 comments on commit 2049cf9

Please sign in to comment.