Fixed linting issues
This commit is contained in:
parent
22c1fed14b
commit
88f92bc0d6
@ -1,5 +1,5 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Layout, Space, Spin } from "antd";
|
||||
import { useState, useEffect } from "react";
|
||||
import { Layout, Space } from "antd";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import ParticlesBackground from "./components/ParticlesBackground";
|
||||
@ -14,7 +14,7 @@ import ExperienceView from "./views/ExperienceView";
|
||||
import BlogsView from "./views/BlogsView";
|
||||
import BlogView from "./views/BlogView";
|
||||
import CacheReloadView from "./utils/CacheReloadView";
|
||||
import { LinkOutlined, UserOutlined, LoadingOutlined } from "@ant-design/icons";
|
||||
import { LoadingOutlined } from "@ant-design/icons";
|
||||
|
||||
const { Content } = Layout;
|
||||
const { Footer } = Layout;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import PropTypes from "prop-types";
|
||||
import { useState } from "react";
|
||||
import { Modal } from "antd";
|
||||
import Turnstile from "react-turnstile";
|
||||
@ -25,4 +26,10 @@ const TurnstileModal = ({ open, onClose, onSuccess }) => {
|
||||
);
|
||||
};
|
||||
|
||||
TurnstileModal.propTypes = {
|
||||
open: PropTypes.bool.isRequired,
|
||||
onClose: PropTypes.func.isRequired,
|
||||
onSuccess: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default TurnstileModal;
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import ReactGA from "react-ga4";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
import { StrictMode } from "react";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useMediaQuery } from "react-responsive";
|
||||
import { Card, Flex, message } from "antd";
|
||||
import { LoadingOutlined } from "@ant-design/icons";
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useMediaQuery } from "react-responsive";
|
||||
import { Tag, Button, Card, Flex, message } from "antd";
|
||||
import { LoadingOutlined } from "@ant-design/icons";
|
||||
@ -140,4 +141,9 @@ const BlogView = ({ setCurrentView, slug }) => {
|
||||
);
|
||||
};
|
||||
|
||||
BlogView.propTypes = {
|
||||
setCurrentView: PropTypes.func.isRequired,
|
||||
slug: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default BlogView;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useMediaQuery } from "react-responsive";
|
||||
import { Tag, Button, Card, Flex, message } from "antd";
|
||||
import { LoadingOutlined } from "@ant-design/icons";
|
||||
@ -201,4 +202,8 @@ const BlogsView = ({ setCurrentView }) => {
|
||||
);
|
||||
};
|
||||
|
||||
BlogsView.propTypes = {
|
||||
setCurrentView: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default BlogsView;
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { useMediaQuery } from "react-responsive";
|
||||
import { Form, Input, Button, Card, Flex } from "antd";
|
||||
import { FilePdfOutlined, CloudDownloadOutlined } from "@ant-design/icons";
|
||||
|
||||
const CVView = ({ setCurrentView }) => {
|
||||
const onFinish = (values) => {
|
||||
console.log("Form values:", values);
|
||||
@ -110,4 +111,8 @@ const CVView = ({ setCurrentView }) => {
|
||||
);
|
||||
};
|
||||
|
||||
CVView.propTypes = {
|
||||
setCurrentView: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default CVView;
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import React, { useState } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { useState } from "react";
|
||||
import { useMediaQuery } from "react-responsive";
|
||||
import { Form, Input, Button, Card, Flex, message } from "antd";
|
||||
import TurnstileModal from "../components/TurnstileModal";
|
||||
import { ArrowRightOutlined } from "@ant-design/icons";
|
||||
|
||||
const ContactView = ({ setCurrentView }) => {
|
||||
const isMobile = useMediaQuery({ maxWidth: 600 });
|
||||
const [turnstileOpen, setTurnstileOpen] = useState(false);
|
||||
@ -30,7 +32,7 @@ const ContactView = ({ setCurrentView }) => {
|
||||
message.error("Verification failed. Try again.");
|
||||
}
|
||||
} catch (error) {
|
||||
message.error("Error sending request.");
|
||||
message.error(`Error sending request: ${error.message}`);
|
||||
}
|
||||
};
|
||||
return (
|
||||
@ -106,4 +108,8 @@ const ContactView = ({ setCurrentView }) => {
|
||||
);
|
||||
};
|
||||
|
||||
ContactView.propTypes = {
|
||||
setCurrentView: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default ContactView;
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
// views/MainView.jsx
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { Button, Flex, Dropdown, message } from "antd";
|
||||
import { UserOutlined } from "@ant-design/icons";
|
||||
import { useMediaQuery } from "react-responsive";
|
||||
import { useKeycloak } from "../utils/KeycloakProvider";
|
||||
|
||||
@ -9,8 +7,6 @@ const MainView = ({ setCurrentView }) => {
|
||||
const isMobile = useMediaQuery({ maxWidth: 600 });
|
||||
const { isAuthenticated, user, keycloak } = useKeycloak();
|
||||
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
|
||||
const authItems = [
|
||||
{
|
||||
label: user?.username,
|
||||
@ -176,4 +172,8 @@ const MainView = ({ setCurrentView }) => {
|
||||
);
|
||||
};
|
||||
|
||||
MainView.propTypes = {
|
||||
setCurrentView: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default MainView;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { Button, Flex } from "antd";
|
||||
|
||||
const NotFoundView = ({ setCurrentView }) => {
|
||||
@ -14,4 +14,8 @@ const NotFoundView = ({ setCurrentView }) => {
|
||||
);
|
||||
};
|
||||
|
||||
NotFoundView.propTypes = {
|
||||
setCurrentView: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default NotFoundView;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { useState } from "react";
|
||||
import { useMediaQuery } from "react-responsive";
|
||||
import { Flex, Spin } from "antd";
|
||||
|
||||
import { LoadingOutlined } from "@ant-design/icons";
|
||||
import { useEffect } from "react";
|
||||
import * as FaIcons from "react-icons/fa6"; // Import all FA6 icons dynamically
|
||||
@ -100,4 +100,8 @@ const SocialsView = ({ referrer }) => {
|
||||
);
|
||||
};
|
||||
|
||||
SocialsView.propTypes = {
|
||||
referrer: PropTypes.string, // Adjust type as needed
|
||||
};
|
||||
|
||||
export default SocialsView;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user