Skip to content

Commit

Permalink
Merge pull request #28 from NitBravoA92/create-myprofile-setup
Browse files Browse the repository at this point in the history
Create empty My profile - Setup
  • Loading branch information
NitBravoA92 committed Jul 24, 2023
2 parents c257de9 + 78bb209 commit 24329c3
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Routes, Route } from 'react-router-dom';
import MyProfile from './views/MyProfile';

function App() {
return (
<div className="App">
<h1>Space Travelers Hub</h1>
</div>
<Routes>
<Route path="my-profile" element={<MyProfile />} />
</Routes>
);
}

Expand Down
12 changes: 12 additions & 0 deletions src/assets/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ body {
letter-spacing: normal;
}

ul {
list-style: none;
}

main {
width: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
padding: 3rem 0;
}

.container {
width: 100%;
margin: 0 auto;
Expand Down
28 changes: 28 additions & 0 deletions src/assets/styles/responsive.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}

@media (min-width: 768px) {
.container {
max-width: 720px;
}

.navbar {
flex-direction: row;
justify-content: space-between;
}
}

@media (min-width: 992px) {
.container {
max-width: 960px;
}
}

@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
5 changes: 4 additions & 1 deletion src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import AppLogo from './AppLogo';
import MenuLink from './MenuLink';
import '../assets/styles/Header.css';

const Header = () => (
<header>
<div className="container">
<nav className="navbar">
<AppLogo />
<ul id="navigation" />
<ul id="navigation">
<MenuLink url="/my-profile" pageName="My Profile" />
</ul>
</nav>
</div>
</header>
Expand Down
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import { BrowserRouter } from 'react-router-dom';
import './assets/styles/index.css';
import App from './App';
import './assets/styles/responsive.css';
import reportWebVitals from './reportWebVitals';

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

Expand Down
17 changes: 17 additions & 0 deletions src/views/Layout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import PropTypes from 'prop-types';
import Header from '../components/Header';

const Layout = ({ children }) => (
<>
<Header />
<main>
{ children }
</main>
</>
);

Layout.propTypes = {
children: PropTypes.node.isRequired,
};

export default Layout;
9 changes: 9 additions & 0 deletions src/views/MyProfile.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Layout from './Layout';

const MyProfile = () => (
<Layout>
<section id="myProfile" />
</Layout>
);

export default MyProfile;

0 comments on commit 24329c3

Please sign in to comment.