Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"react/jsx-filename-extension": "error",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react-hooks/exhaustive-deps": "warn",
"import/no-unresolved": ["off", { "ignore": [".css$"] }],
"import/prefer-default-export": "off",
Expand Down
16,829 changes: 16,829 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.6.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^10.4.9",
"@testing-library/user-event": "^12.1.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"antd": "^4.14.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3"
"react-scripts": "4.0.3",
"react-test-renderer": "^17.0.2",
"styled-components": "^5.2.1",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
15 changes: 15 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// import './global.css';
// import Header from '../src/pages/Header/Header';
// import Home from './pages/Home/Layout/Layout';
// import 'antd/dist/antd.css'

// function App() {
// return (
// <div>
// <Header/>
// <Home/>
// </div>
// );
// }

// export default App;
Comment on lines +1 to +15

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the file if it is no needed

4 changes: 3 additions & 1 deletion src/components/App/App.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import NotFound from '../../pages/NotFound';
import SecretPage from '../../pages/Secret';
import Private from '../Private';
import Fortune from '../Fortune';
import Layout from '../Layout';
import Layout from '../Layout/Layout.component';
import { random } from '../../utils/fns';
import Header from '../../pages/Header/Header';

function App() {
useLayoutEffect(() => {
Expand All @@ -32,6 +33,7 @@ function App() {

return (
<BrowserRouter>
<Header />
<AuthProvider>
<Layout>
<Switch>
Expand Down
25 changes: 25 additions & 0 deletions src/components/Layout/Layout.Style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import styled from 'styled-components';
import { White } from '../../constants/Colors';

const LayoutGeneral = styled.div`
display: flex;
background-color: ${White};
width: 100%;
height: auto;
flex-direction: column;
align-items: center;
& > Link {
color: red;
}
`;

export { LayoutGeneral };
/* .container {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: -3rem;
} */
Comment on lines +17 to +25

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, remove unused comments.

5 changes: 2 additions & 3 deletions src/components/Layout/Layout.component.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';

import './Layout.styles.css';
import { LayoutGeneral } from './Layout.Style';

function Layout({ children }) {
return <main className="container">{children}</main>;
return <LayoutGeneral>{children}</LayoutGeneral>;
}

export default Layout;
9 changes: 0 additions & 9 deletions src/components/Layout/Layout.styles.css

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Layout/index.js

This file was deleted.

14 changes: 14 additions & 0 deletions src/constants/Colors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Light mode Colors

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about creating themes instead, something like:

const themes = {
  dark: {
    primary: ...
  },
  light: {
    primary: ...
  }
}

Then you can re-use this them among all your components and styled components

export const White = '#F2F2F2';
export const GrayLight = '#BDBFBF';
export const GrayLight2 = '#E4E4E4';
export const GrayMed = '#595959';
export const Red = '#D90404';
export const DarkRed = '#590A0A';

// Dark mode Colors
export const Wine = '#2E0012';
export const Cherry = '#4F0E00';
export const DarkCherry = '#2E0012';
export const DarkGray = '11000A';
export const Magenta = '#750027';
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactDOM from 'react-dom';

import App from './components/App';
import './global.css';
import 'antd/dist/antd.css';

ReactDOM.render(
<React.StrictMode>
Expand Down
Loading