@@ -39,7 +36,7 @@ function article_1() {
};
}
-function article_2() {
+function article_2(): Article {
return {
date: "7 May 2023",
title: "Artificial Intelligence in Healthcare",
diff --git a/src/data/seo.js b/src/data/seo.ts
similarity index 92%
rename from src/data/seo.js
rename to src/data/seo.ts
index 4bee91813..647ae4df2 100644
--- a/src/data/seo.js
+++ b/src/data/seo.ts
@@ -1,4 +1,10 @@
-const SEO = [
+export interface SEOItem {
+ page: string;
+ description: string;
+ keywords: string[];
+}
+
+const SEO: SEOItem[] = [
{
page: "home",
description:
diff --git a/src/data/tracking.js b/src/data/tracking.ts
similarity index 70%
rename from src/data/tracking.js
rename to src/data/tracking.ts
index 0117e410b..81c4eaa6d 100644
--- a/src/data/tracking.js
+++ b/src/data/tracking.ts
@@ -1,3 +1,3 @@
// Google Analytics Tracking ID
// https://github.com/truethari/reactfolio#-google-analytics
-export const TRACKING_ID = "";
+export const TRACKING_ID: string = "";
diff --git a/src/data/user.js b/src/data/user.ts
similarity index 85%
rename from src/data/user.js
rename to src/data/user.ts
index 6dcf5bdac..3a8aeb4ad 100644
--- a/src/data/user.js
+++ b/src/data/user.ts
@@ -1,4 +1,42 @@
-const INFO = {
+interface Project {
+ title: string;
+ description: string;
+ logo: string;
+ linkText: string;
+ link: string;
+ }
+
+ interface Info {
+ main: {
+ title: string;
+ name: string;
+ email: string;
+ logo: string;
+ };
+ socials: {
+ twitter: string;
+ github: string;
+ linkedin: string;
+ instagram: string;
+ stackoverflow: string;
+ facebook: string;
+ };
+ homepage: {
+ title: string;
+ description: string;
+ };
+ about: {
+ title: string;
+ description: string;
+ };
+ articles: {
+ title: string;
+ description: string;
+ };
+ projects: Project[];
+ }
+
+const INFO: Info = {
main: {
title: "Reactfolio by truethari",
name: "Tharindu N.",
diff --git a/src/index.js b/src/index.js
deleted file mode 100644
index 8759d3e43..000000000
--- a/src/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import React from "react";
-import ReactDOM from "react-dom/client";
-import "./index.css";
-import App from "./App";
-import reportWebVitals from "./reportWebVitals";
-import { BrowserRouter } from "react-router-dom";
-
-const root = ReactDOM.createRoot(document.getElementById("root"));
-root.render(
-
-
-
-
-
-);
-
-// If you want to start measuring performance in your app, pass a function
-// to log results (for example: reportWebVitals(console.log))
-// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
-reportWebVitals();
diff --git a/src/index.jsx b/src/index.jsx
new file mode 100644
index 000000000..505325618
--- /dev/null
+++ b/src/index.jsx
@@ -0,0 +1,13 @@
+import React from "react";
+import ReactDOM from "react-dom/client";
+import "./index.css";
+import App from "./App.tsx";
+import { BrowserRouter } from "react-router-dom";
+
+ReactDOM.createRoot(document.getElementById("root")).render(
+
+
+
+
+
+);
diff --git a/src/pages/404.jsx b/src/pages/404.tsx
similarity index 93%
rename from src/pages/404.jsx
rename to src/pages/404.tsx
index af2386ed1..d64dc129d 100644
--- a/src/pages/404.jsx
+++ b/src/pages/404.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect } from "react";
+import { useEffect } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faFaceSadTear } from "@fortawesome/free-regular-svg-icons";
@@ -16,7 +16,7 @@ const Notfound = () => {
}, []);
return (
-
+ <>
@@ -44,7 +44,7 @@ const Notfound = () => {
-