old-ybbond

My old site that was written with ReactJS
Log | Files | Refs | README

commit de1ec92afa793d63d15c9555c709b19836f2d03e
parent bdf06580f6056f471643d00bcc8ec9b83138c80c
Author: Yohanes Bandung <bandungpenting@gmail.com>
Date:   Wed, 25 Mar 2020 21:40:55 +0700

refactor(core): indexing the components

Diffstat:
Msrc/App.js | 2+-
Msrc/Components/HeaderFooter.js | 4+---
Msrc/Components/List.js | 2+-
Asrc/Components/index.js | 6++++++
Msrc/Pages/AboutPage.js | 2+-
Msrc/Pages/CVPage.js | 4+---
Msrc/Pages/NotFoundPage.js | 3+--
Msrc/Pages/UsesPage.js | 4+---

8 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/src/App.js b/src/App.js
@@ -6,7 +6,7 @@ import {createBrowserHistory} from 'history';
 import theme from 'styled-theming';
 
 import routes from './routes';
-import HeaderFooter from './Components/HeaderFooter';
+import {HeaderFooter} from './Components';
 import Style from './Theme/Style';
 import {colors} from './Theme/colors';
 
diff --git a/src/Components/HeaderFooter.js b/src/Components/HeaderFooter.js
@@ -3,9 +3,7 @@ import React from 'react';
 import styled from 'styled-components';
 import theme from 'styled-theming';
 
-import Button from './Button';
-import Link from './Link';
-import Text from './Text';
+import {Button, Link, Text} from './';
 import {colors} from '../Theme/colors';
 
 const borderColor = theme('mode', {
diff --git a/src/Components/List.js b/src/Components/List.js
@@ -1,7 +1,7 @@
 // @flow
 import React from 'react';
 import styled, {css, type StyledComponent} from 'styled-components';
-import Text from './Text';
+import {Text} from './';
 import {colors} from '../Theme/colors';
 
 type Props = {|
diff --git a/src/Components/index.js b/src/Components/index.js
@@ -0,0 +1,6 @@
+// @flow
+export {default as Button} from './Button';
+export {default as HeaderFooter} from './HeaderFooter';
+export {default as Link} from './Link';
+export {default as List} from './List';
+export {default as Text} from './Text';
diff --git a/src/Pages/AboutPage.js b/src/Pages/AboutPage.js
@@ -1,7 +1,7 @@
 // @flow
 import React from 'react';
 
-import Text from '../Components/Text';
+import {Text} from '../Components';
 
 const CVPage = () => {
   return (
diff --git a/src/Pages/CVPage.js b/src/Pages/CVPage.js
@@ -1,9 +1,7 @@
 // @flow
 import React from 'react';
 
-import Link from '../Components/Link';
-import List from '../Components/List';
-import Text from '../Components/Text';
+import {Link, List, Text} from '../Components';
 
 const CVPage = () => {
   return (
diff --git a/src/Pages/NotFoundPage.js b/src/Pages/NotFoundPage.js
@@ -1,8 +1,7 @@
 // @flow
 import React from 'react';
 
-import Link from '../Components/Link';
-import Text from '../Components/Text';
+import {Link, Text} from '../Components';
 
 const NotFoundPage = () => {
   return (
diff --git a/src/Pages/UsesPage.js b/src/Pages/UsesPage.js
@@ -1,9 +1,7 @@
 // @flow
 import React from 'react';
 
-import Text from '../Components/Text';
-import List from '../Components/List';
-import Link from '../Components/Link';
+import {List, Link, Text} from '../Components';
 
 const UsesPage = () => {
   return (