Skip to content

Commit

Permalink
rename descriptionText
Browse files Browse the repository at this point in the history
  • Loading branch information
noamilsh committed Jul 8, 2022
1 parent 279e64f commit c09ff1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useState } from 'react';
import DescriptionContainer from '../descriptionContainer/DescriptionContainer';
import style from './layout.module.scss';

const Layout = ({ children, descriptionText }: LayoutProps) => {
const Layout = ({ children, descriptionContent }: LayoutProps) => {
const currentRoute = useRouter().pathname;
const { title, metaContents } = getMetaData(currentRoute);
const [currentHeight, setCurrentHeight] = useState(0);
Expand All @@ -28,7 +28,7 @@ const Layout = ({ children, descriptionText }: LayoutProps) => {
setCurrentHeight(hight);
}}
>
<div className={style.description}>{descriptionText}</div>
<div className={style.description}>{descriptionContent}</div>
</DescriptionContainer>
{children}
<Footer />
Expand All @@ -38,7 +38,7 @@ const Layout = ({ children, descriptionText }: LayoutProps) => {

interface LayoutProps {
children: object;
descriptionText?: object;
descriptionContent?: object;
}

export default Layout;
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface IHomeProps {

export default function Home({ people }: IHomeProps) {
return (
<Layout descriptionText={MainPageDescription()}>
<Layout descriptionContent={<MainPageDescription/>}>
<div className={styles.container}>
<div className={styles.cards__wrapper}>
{people.map((person, i) => (
Expand Down
2 changes: 1 addition & 1 deletion pages/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Vast() {
console.log(currentHeight);

return (
<Layout descriptionText={ProjectPage()}>
<Layout descriptionContent={<ProjectPage/>}>
<h1>projects</h1>
</Layout>
);
Expand Down

0 comments on commit c09ff1d

Please sign in to comment.