diff --git a/constant.js b/constant.js
index 9e7976c..450196c 100644
--- a/constant.js
+++ b/constant.js
@@ -6,7 +6,13 @@ const BG_INDEX = 'img/bg.jpeg'
const BG_ME = 'https://retrina.com/demo/arshia/cv/assets/img/about-03.jpg'
-const PAGES = ['/', '/about', '/portfolio', '/resume', '/contact']
+const MENU = [
+ { title: 'Home', path: '/', icon: 'fa-home' },
+ { title: 'About Me', path: '/about', icon: 'fa-user' },
+ { title: 'Resume', path: '/resume', icon: 'fa-file-invoice' },
+ { title: 'Portfolio', path: '/portfolio', icon: 'fa-briefcase' },
+ { title: 'Contact', path: '/contact', icon: 'fa-paper-plane' },
+]
const SOCIAL_MEDIA = [
{
@@ -171,7 +177,6 @@ module.exports = {
BG_INDEX,
NAME,
PERSON,
- PAGES,
DOING,
ABOUT,
EDUCATION,
@@ -179,8 +184,6 @@ module.exports = {
SKILLS,
SOCIAL_MEDIA,
PORTFOLIOS,
+ MENU,
emailTemplate,
}
-
-// 'https://images.pexels.com/photos/247791/pexels-photo-247791.png?auto=compress&cs=tinysrgb&h=750&w=1260'
-// 'https://image.freepik.com/free-photo/rear-view-programmer-working-all-night-long_1098-18697.jpg'
diff --git a/src/components/Chevrons.tsx b/src/components/Chevrons.tsx
index 955c6a0..06abcce 100644
--- a/src/components/Chevrons.tsx
+++ b/src/components/Chevrons.tsx
@@ -1,6 +1,8 @@
import { FC, useEffect, useState } from 'react'
import { useRouter } from 'next/router'
-import { PAGES } from '../../constant'
+import { MENU } from '../../constant'
+
+const PAGES = MENU.map(el => el.path)
const infinitePage = (index: number, radix: number = 1) =>
[0, 1, 2, 3, 4].includes(index + radix) ? index + radix : radix === -1 ? 4 : 0
@@ -21,12 +23,14 @@ const Chevrons: FC = ({}) => {
+ className='animate-pulse w-full h-1/2 bg-blue-600 rounded-l-xl grid place-items-center cursor-pointer'
+ >
+ className='animate-pulse w-full h-1/2 bg-blue-600 rounded-l-xl grid place-items-center cursor-pointer'
+ >
diff --git a/src/components/Switch.tsx b/src/components/Switch.tsx
index c5c819a..a314cc0 100644
--- a/src/components/Switch.tsx
+++ b/src/components/Switch.tsx
@@ -1,21 +1,31 @@
-import React from 'react'
+import React, { useContext, useEffect, useState } from 'react'
+import ThemeContext from '../context/ThemeContext'
interface Props {
onClick: (() => void | undefined) | undefined
}
const Switch: React.FC = ({ onClick }) => {
+ const { theme } = useContext(ThemeContext)
+
return (
>
diff --git a/src/components/utils/Button.tsx b/src/components/utils/Button.tsx
index 23bbf51..74e82e2 100644
--- a/src/components/utils/Button.tsx
+++ b/src/components/utils/Button.tsx
@@ -4,18 +4,20 @@ interface Props {
title:
| string
| React.DetailedHTMLProps, HTMLElement>
- className?: string
- type?: 'button' | 'submit' | 'reset'
- disabled?: boolean
- onClick?: () => void
+ className: string
+ type: 'button' | 'submit' | 'reset'
+ disabled: boolean
+ active: boolean
+ onClick: () => void
}
-const Button: React.FC = ({
+const Button: React.FC> = ({
title,
className,
type,
onClick,
disabled = false,
+ active = false,
}) => {
return (