From 7dd0e13cd69d147f6342833c1b6cf0719ccdd0d7 Mon Sep 17 00:00:00 2001 From: Dejvino Date: Sat, 27 May 2023 05:25:48 +0200 Subject: [PATCH] Extract hooks folder --- src/app/components/AboutBrief.tsx | 2 +- src/app/components/Contacts.tsx | 4 ++-- src/app/components/Education.tsx | 2 +- src/app/components/Footer.tsx | 2 +- src/app/components/JobCard.tsx | 2 +- src/app/components/Skills.tsx | 2 +- src/app/components/TagCloud.tsx | 2 +- src/app/components/WorkExperience.tsx | 2 +- src/app/{ => hooks}/FocusedElement.tsx | 0 src/app/{components => hooks}/PersonContext.tsx | 0 src/app/layout.tsx | 2 +- 11 files changed, 10 insertions(+), 10 deletions(-) rename src/app/{ => hooks}/FocusedElement.tsx (100%) rename src/app/{components => hooks}/PersonContext.tsx (100%) diff --git a/src/app/components/AboutBrief.tsx b/src/app/components/AboutBrief.tsx index 28e61ed..07647ae 100644 --- a/src/app/components/AboutBrief.tsx +++ b/src/app/components/AboutBrief.tsx @@ -1,7 +1,7 @@ import React, { useContext } from 'react'; import Container from 'react-bootstrap/Container'; import Image from 'react-bootstrap/Image' -import { usePersonContext } from './PersonContext'; +import { usePersonContext } from '../hooks/PersonContext'; import { Col, Row } from 'react-bootstrap'; export default function AboutBrief() { diff --git a/src/app/components/Contacts.tsx b/src/app/components/Contacts.tsx index 15e3254..52c4af9 100644 --- a/src/app/components/Contacts.tsx +++ b/src/app/components/Contacts.tsx @@ -1,7 +1,7 @@ import React, { ReactNode } from 'react' -import { usePersonContext } from './PersonContext' +import { usePersonContext } from '../hooks/PersonContext' import Container from 'react-bootstrap/esm/Container' -import { useAutoFocus } from '../FocusedElement' +import { useAutoFocus } from '../hooks/FocusedElement' import { Col, Row } from 'react-bootstrap' export function Contact(props: {icon?: string, text: string}) { diff --git a/src/app/components/Education.tsx b/src/app/components/Education.tsx index fa4f4bf..a5ad2db 100644 --- a/src/app/components/Education.tsx +++ b/src/app/components/Education.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { usePersonContext } from './PersonContext'; +import { usePersonContext } from '../hooks/PersonContext'; import JobHistory from './JobHistory'; export default function WorkExperience() { diff --git a/src/app/components/Footer.tsx b/src/app/components/Footer.tsx index 1058300..21b8a0a 100644 --- a/src/app/components/Footer.tsx +++ b/src/app/components/Footer.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Container } from 'react-bootstrap'; -import { usePersonContext } from './PersonContext'; +import { usePersonContext } from '../hooks/PersonContext'; export default function Footer() { const personalData = usePersonContext() diff --git a/src/app/components/JobCard.tsx b/src/app/components/JobCard.tsx index 806feaf..756961c 100644 --- a/src/app/components/JobCard.tsx +++ b/src/app/components/JobCard.tsx @@ -1,6 +1,6 @@ import React from 'react'; import Card from 'react-bootstrap/Card'; -import { useAutoFocus, useFocusedElement } from '../FocusedElement'; +import { useAutoFocus, useFocusedElement } from '../hooks/FocusedElement'; export type Props = { heading?: string, diff --git a/src/app/components/Skills.tsx b/src/app/components/Skills.tsx index 88d9e85..80769cf 100644 --- a/src/app/components/Skills.tsx +++ b/src/app/components/Skills.tsx @@ -1,6 +1,6 @@ import React, { useContext } from 'react'; import Container from 'react-bootstrap/Container'; -import { PersonContext } from './PersonContext'; +import { PersonContext } from '../hooks/PersonContext'; import TagCloud from './TagCloud'; export default function Skills() { diff --git a/src/app/components/TagCloud.tsx b/src/app/components/TagCloud.tsx index 186fbbd..07db133 100644 --- a/src/app/components/TagCloud.tsx +++ b/src/app/components/TagCloud.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from 'react'; import Container from 'react-bootstrap/Container'; -import { useAutoFocus, useFocusedElement } from '../FocusedElement'; +import { useAutoFocus, useFocusedElement } from '../hooks/FocusedElement'; export type Props = { title: string, diff --git a/src/app/components/WorkExperience.tsx b/src/app/components/WorkExperience.tsx index 0ec6d22..a765906 100644 --- a/src/app/components/WorkExperience.tsx +++ b/src/app/components/WorkExperience.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { usePersonContext } from './PersonContext'; +import { usePersonContext } from '../hooks/PersonContext'; import JobHistory from './JobHistory'; export default function WorkExperience() { diff --git a/src/app/FocusedElement.tsx b/src/app/hooks/FocusedElement.tsx similarity index 100% rename from src/app/FocusedElement.tsx rename to src/app/hooks/FocusedElement.tsx diff --git a/src/app/components/PersonContext.tsx b/src/app/hooks/PersonContext.tsx similarity index 100% rename from src/app/components/PersonContext.tsx rename to src/app/hooks/PersonContext.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index a89aad6..1e6389e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,7 +2,7 @@ import React from 'react' import { Inter } from 'next/font/google' import './globals.css' -import { PersonProvider } from './components/PersonContext' +import { PersonProvider } from './hooks/PersonContext' import { personalData } from '../PersonalData' const inter = Inter({ subsets: ['latin'] })