feat: refactor data structures and interfaces for better organization
This commit is contained in:
@@ -1,11 +1,9 @@
|
|||||||
import {socialLinkData} from '../data/socialLinkData'
|
import {socialLinkData} from '../data/socialLinkData'
|
||||||
export interface socialLink {
|
import type {SocialLink} from '../untils/SocialLink'
|
||||||
icon: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Footer = () => {
|
export const Footer = () => {
|
||||||
const socialLinks: socialLink[] = socialLinkData;
|
const socialLinks: SocialLink[] = socialLinkData;
|
||||||
|
|
||||||
const currentYear = new Date().getFullYear()
|
const currentYear = new Date().getFullYear()
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,16 +1,7 @@
|
|||||||
import styles from '@styles/SkillCard.module.scss';
|
import styles from '@styles/SkillCard.module.scss';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export interface Skill {
|
import type {SkillCardProps} from '../untils/SkillCardProps';
|
||||||
name: string;
|
|
||||||
icon: React.ReactNode; // Or string if using CSS classes for icons
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SkillCardProps {
|
|
||||||
categoryTitle: string;
|
|
||||||
categoryIcon: React.ReactNode; // Or string
|
|
||||||
skills: Skill[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const SkillCard: React.FC<SkillCardProps> = ({ categoryTitle, categoryIcon, skills }) => {
|
const SkillCard: React.FC<SkillCardProps> = ({ categoryTitle, categoryIcon, skills }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { type AboutProps } from "../pages/About";
|
import type {AboutProps} from '../untils/AboutProps'
|
||||||
|
|
||||||
|
|
||||||
export const aboutProps: AboutProps = {
|
export const aboutProps: AboutProps = {
|
||||||
coreValues: [
|
coreValues: [
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {type SkillCardProps} from '../components/SkillCard';
|
import {type SkillCardProps} from '../untils/SkillCardProps';
|
||||||
|
|
||||||
export const skillCardData: SkillCardProps[] = [
|
export const skillCardData: SkillCardProps[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {type socialLink} from "../components/Footer";
|
import {type SocialLink} from "../untils/SocialLink";
|
||||||
|
|
||||||
export const socialLinkData: socialLink[] = [
|
export const socialLinkData: SocialLink[] = [
|
||||||
{
|
{
|
||||||
icon: "fab fa-github",
|
icon: "fab fa-github",
|
||||||
url: ""
|
url: ""
|
||||||
|
|||||||
@@ -3,37 +3,6 @@ import { aboutProps } from '../data/experienceData';
|
|||||||
|
|
||||||
import style from '@styles/About.module.scss';
|
import style from '@styles/About.module.scss';
|
||||||
|
|
||||||
export interface AboutProps {
|
|
||||||
coreValues: CoreValue[];
|
|
||||||
technicalArsenal: TechnicalArsenal[];
|
|
||||||
professionalJourney: ProfessionalJourney[];
|
|
||||||
testimonials: Testimonial[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CoreValue {
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
icon: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProfessionalJourney {
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
duration: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TechnicalArsenal {
|
|
||||||
title: string;
|
|
||||||
icon: string;
|
|
||||||
skills: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Testimonial {
|
|
||||||
content: string;
|
|
||||||
author: string;
|
|
||||||
position: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const About = () => {
|
export const About = () => {
|
||||||
const data = aboutProps;
|
const data = aboutProps;
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
export interface AboutProps {
|
||||||
|
coreValues: CoreValue[];
|
||||||
|
technicalArsenal: TechnicalArsenal[];
|
||||||
|
professionalJourney: ProfessionalJourney[];
|
||||||
|
testimonials: Testimonial[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CoreValue {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
icon: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProfessionalJourney {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
duration: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TechnicalArsenal {
|
||||||
|
title: string;
|
||||||
|
icon: string;
|
||||||
|
skills: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Testimonial {
|
||||||
|
content: string;
|
||||||
|
author: string;
|
||||||
|
position: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
export interface Skill {
|
||||||
|
name: string;
|
||||||
|
icon: React.ReactNode; // Or string if using CSS classes for icons
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SkillCardProps {
|
||||||
|
categoryTitle: string;
|
||||||
|
categoryIcon: React.ReactNode; // Or string
|
||||||
|
skills: Skill[];
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export interface SocialLink {
|
||||||
|
icon: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user