rename one directory (HomePage -> IndexPage) and one file (routes -> routing)

This commit is contained in:
Dawid Wysokiński 2021-05-14 12:45:12 +02:00
parent 698aabed17
commit 391b85be58
18 changed files with 12 additions and 10 deletions

View File

@ -1,11 +1,11 @@
import React from 'react';
import classnames from 'classnames';
import * as routes from '@config/routes';
import { Route } from '@config/routing';
import useSmoothScroll from '@libs/useSmoothScroll';
import logo from '@images/logo.svg';
import { HEADER_ID } from '@features/HomePage/components/Header';
import { SECTION_ID as PORTFOLIO_SECTION_ID } from '@features/HomePage/components/Portfolio/Portfolio';
import { SECTION_ID as CONTACT_SECTION_ID } from '@features/HomePage/components/Contact';
import { HEADER_ID } from '@features/IndexPage/components/Header';
import { SECTION_ID as PORTFOLIO_SECTION_ID } from '@features/IndexPage/components/Portfolio/Portfolio';
import { SECTION_ID as CONTACT_SECTION_ID } from '@features/IndexPage/components/Contact';
import { makeStyles } from '@material-ui/core/styles';
import { AppBar, Toolbar, Container, Link } from '@material-ui/core';
@ -25,7 +25,7 @@ function Navbar({ className, ...rest }) {
<Container>
<Toolbar className={classes.toolbar} disableGutters>
<div className={classes.titleContainer}>
<GatsbyLink title="Strona główna" color="inherit" to={routes.HOME}>
<GatsbyLink title="Strona główna" color="inherit" to={Route.IndexPage}>
<img className={classes.logo} src={logo} alt="logo" />
</GatsbyLink>
</div>

View File

@ -1 +0,0 @@
export const HOME = '/';

3
src/config/routing.js Normal file
View File

@ -0,0 +1,3 @@
export const Route = {
IndexPage: '/',
}

View File

@ -16,7 +16,7 @@ const useStyles = makeStyles(theme => ({
},
}));
const HomePage = ({ location }) => {
const IndexPage = ({ location }) => {
const classes = useStyles();
return (
<Layout className={classes.layout} navbarProps={{ position: 'absolute' }}>
@ -32,4 +32,4 @@ const HomePage = ({ location }) => {
);
};
export default HomePage;
export default IndexPage;

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View File

@ -1,7 +1,7 @@
import React from 'react';
import HomePage from '@features/HomePage/HomePage';
import IndexPage from '@features/IndexPage/IndexPage';
const IndexPage = props => <HomePage {...props} />;
const IndexPage = props => <IndexPage {...props} />;
export default IndexPage;