Skip to content

Commit

Permalink
Remove unused code/function/variables and some errors thanks to oxlint
Browse files Browse the repository at this point in the history
Fix an issue about the files when editing a SGC register
  • Loading branch information
Heibert committed Sep 17, 2024
1 parent 862661e commit e109748
Show file tree
Hide file tree
Showing 21 changed files with 5,975 additions and 4,643 deletions.
10,194 changes: 5,870 additions & 4,324 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

32 changes: 2 additions & 30 deletions src/components/common/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import SnackbarAlert from './SnackBarAlert';
import { getApiUrl } from '../../assets/getApi';
import MyAccountDialog from '../shared/MyAccount';
import InactivityDetector from '../shared/InactivityDetector';
import VacationsRequest from '../shared/VacationsRequest';
import Notifications from '../shared/Notifications';
import { handleError } from '../../assets/handleError';

Expand All @@ -24,7 +23,6 @@ import {
IconButton,
Avatar,
ListItemIcon,
useMediaQuery,
ListItemText,
LinearProgress,
Fade,
Expand All @@ -44,9 +42,7 @@ import {
} from '@mui/material';

// Icons
import { Logout, Settings } from '@mui/icons-material';
import RequestPageIcon from '@mui/icons-material/RequestPage';
import FeedIcon from '@mui/icons-material/Feed';
import Logout from '@mui/icons-material/Logout';
import FlagIcon from '@mui/icons-material/Flag';
import UploadFileIcon from '@mui/icons-material/UploadFile';
import DriveFileMoveIcon from '@mui/icons-material/DriveFileMove';
Expand All @@ -59,10 +55,8 @@ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
import DescriptionIcon from '@mui/icons-material/Description';
import TopicIcon from '@mui/icons-material/Topic';
import LuggageIcon from '@mui/icons-material/Luggage';
import NotificationsIcon from '@mui/icons-material/Notifications';
import BeachAccessIcon from '@mui/icons-material/BeachAccess';
import ExtensionIcon from '@mui/icons-material/Extension';
import SportsScoreIcon from '@mui/icons-material/SportsScore';

// Media
Expand All @@ -73,8 +67,6 @@ const Navbar = () => {
const [openCollapseEmail, setOpenCollapseEmail] = useState(false);
const [anchorEl, setAnchorEl] = useState(null);
const [anchorElUtils, setAnchorElUtils] = useState(null);
const [anchorElMenu, setAnchorElMenu] = useState(null);
const openMenu = Boolean(anchorElMenu);
const open = Boolean(anchorEl);
const navigate = useNavigate();
const [severity, setSeverity] = useState('success');
Expand All @@ -83,7 +75,6 @@ const Navbar = () => {
const openUtils = Boolean(anchorElUtils);
const [openDialog, setOpenDialog] = useState(false);
const [openAccountDialog, setOpenAccountDialog] = useState(false);
const cedula = JSON.parse(localStorage.getItem('cedula'));
const [openCertification, setOpenCertification] = useState(false);
const [openCollapseBonuses, setOpenCollapseBonuses] = useState(false);
const [checked, setChecked] = useState(false);
Expand Down Expand Up @@ -173,11 +164,7 @@ const Navbar = () => {
setAnchorElUtils(event.currentTarget);
};

const handleUtilitariosMenuClose = () => {
setAnchorElUtils(null);
};

function CustomNavLink({ to, children, onMouseEnter, anchor }) {
function CustomNavLink({ to, children }) {
let match = useMatch(to);
return (
<Button
Expand Down Expand Up @@ -242,15 +229,6 @@ const Navbar = () => {

const handleOpenCollapseBonuses = () =>
setOpenCollapseBonuses(!openCollapseBonuses);
const handleOpenSnack = () => setOpenSnack(true);

const handleClickMenu = (event) => {
setAnchorElMenu(event.currentTarget);
};

const handleCloseMenu = () => {
setAnchorElMenu(null);
};

const handleCloseUtils = () => {
setAnchorElUtils(null);
Expand All @@ -264,10 +242,6 @@ const Navbar = () => {
setAnchorNotification(event.currentTarget);
};

const handleClickUtils = (event) => {
setAnchorElUtils(event.currentTarget);
};

const handleClose = () => {
setAnchorEl(null);
};
Expand Down Expand Up @@ -373,8 +347,6 @@ const Navbar = () => {
handleOpenCollapseBonuses();
};

const isMobile = useMediaQuery('(max-width: 600px)');

return (
<>
{isAdvisor ? (
Expand Down
21 changes: 6 additions & 15 deletions src/components/pages/Article.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import financialHealth1 from '../../images/blog/Salud_financiera_1.png';
import financialHealth2 from '../../images/blog/Salud_financiera_2.png';
import elLibertador from '../../images/blog/el-libertador.png';
import bancoSantander from '../../images/blog/banco-santander.png';
import cooperativaMinutodeDios from '../../images/blog/cooperativa-minuto-de-dios.png';
import cooperativaMinutoDeDios from '../../images/blog/cooperativa-minuto-de-dios.png';
import nuBank from '../../images/blog/nubank.png';
import carteraPropiaLogo from '../../images/blog/cartera-propia-logo.png';
import ciberseguridad2 from '../../images/blog/ciberseguridad-2.jpg';
Expand Down Expand Up @@ -109,7 +109,7 @@ const ArticlePage = () => {
<img
style={{ borderRadius: '8px' }}
width="400"
src={cooperativaMinutodeDios}
src={cooperativaMinutoDeDios}
alt=""
/>
</div>
Expand Down Expand Up @@ -154,7 +154,7 @@ const ArticlePage = () => {
<p>
En la era digital, donde la información es un activo
invaluable, la seguridad cibernética se convierte en un
pilar fundamental para emprecomo la nuestra,
pilar fundamental para empresas como la nuestra,
comprometida con brindar servicios de calidad y
confiabilidad a nuestros clientes. En C&C Services, la
protección de los datos y la salvaguardia de la
Expand Down Expand Up @@ -213,7 +213,7 @@ const ArticlePage = () => {
</li>
<li>
<strong>
Políticas Rigurode Acceso y Control:
Políticas Rigurosas de Acceso y Control:
</strong>{' '}
Establecemos controles de acceso estrictos y
prácticas de autenticación fuertes para garantizar
Expand All @@ -237,7 +237,7 @@ const ArticlePage = () => {
<p>
En un mundo digital en constante evolución, estamos
comprometidos con la mejora continua de nuestras
defencibernéticas. Mantener la seguridad de la
defensas cibernéticas. Mantener la seguridad de la
información es un viaje sin fin que requiere adaptación
constante y vigilancia.
</p>
Expand Down Expand Up @@ -315,7 +315,7 @@ const ArticlePage = () => {
En la primera etapa, ejecutada durante el 2023, la
empresa participó en una consultoría brindada por
COLCOB. Esta agremiación, que reúne a las cade cobranzas
más destacadas en Colombia, reconoció a C&C Sevices
más destacadas en Colombia, reconoció a C&C Services
entre los 10 primeros lugares en su ranking.
</p>
<p>
Expand Down Expand Up @@ -656,8 +656,6 @@ const ArticlePage = () => {
return <Typography variant="h4">Article not found</Typography>;
}

const contentHtml = { __html: article.content };

return (
<Container sx={{ height: 'max-content' }}>
<Box
Expand Down Expand Up @@ -701,13 +699,6 @@ const ArticlePage = () => {
gap: '2rem',
}}
>
{/* <Box sx={{ display: "flex", alignItems: "center", gap: "0.5rem", pt: "2rem" }}>
<Avatar alt="Remy Sharp" src={article.imgAuthor} sx={{ width: 56, height: 56 }} />
<Box>
<Typography>{article.nameAuthor}</Typography>
<Typography sx={{ color: "gray", fontSize: "12px" }}>{article.date}</Typography>
</Box>
</Box> */}
<Box sx={{ textAlign: 'justify', pt: '2rem' }}>
{article.content}
</Box>
Expand Down
2 changes: 0 additions & 2 deletions src/components/pages/Blog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import FolderIcon from '@mui/icons-material/Folder';
import CalendarMonthIcon from '@mui/icons-material/CalendarMonth';

const MediaCard = ({ title, subtitle, img, articleId }) => {
const [imageLoaded, setImageLoaded] = useState(false);

useEffect(() => {
window.scrollTo(0, 0);
}, []);
Expand Down
3 changes: 0 additions & 3 deletions src/components/pages/EmploymentCertification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ export const EmploymentCertification = () => {
const [severity, setSeverity] = useState('success');
const [message, setMessage] = useState();
const [openSnack, setOpenSnack] = useState(false);
const [openDialog, setOpenDialog] = useState(false);
const [openDialogEdit, setOpenDialogEdit] = useState(false);
const [disabled, setDisabled] = useState(false);
const navigate = useNavigate();
const permissions = JSON.parse(localStorage.getItem('permissions'));

Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/EthicalLine.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const EthicalLine = () => {
};

const handleSubmit = async (values) => {
let { radio, contact, ...rest } = values;
let { contact, ...rest } = values;

// Remove the contact field if it's empty
if (contact === '') {
Expand Down
42 changes: 2 additions & 40 deletions src/components/pages/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState, useLocation, useContext } from 'react';
import React, { useEffect, useState } from 'react';

// Custom Components
import { getApiUrl } from '../../assets/getApi.js';
Expand All @@ -8,18 +8,7 @@ import { handleError } from '../../assets/handleError';
import { EmblaCarousel } from '../shared/EmblaCarousel.jsx';

// Material-UI
import {
Typography,
Box,
Container,
useMediaQuery,
Card,
List,
ListItem,
ListItemAvatar,
ListItemText,
Avatar,
} from '@mui/material';
import { Typography, Box, Container, useMediaQuery, Card } from '@mui/material';

// Media
import realBenefit2 from '../../images/benefits/benefit-1.png';
Expand Down Expand Up @@ -162,33 +151,6 @@ const Home = () => {
window.scrollTo(0, 0);
}, []);

const noBirthdays = (message) => {
return (
<Box
sx={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
height: '100%',
}}
>
<Typography
sx={{
color: 'gray',
display: 'flex',
width: '100%',
justifyContent: 'center',
fontWeight: 500,
fontSize: '16px',
textAlign: 'center',
}}
>
{message}
</Typography>
</Box>
);
};

return (
<>
{/* <Box sx={{ display: "flex", mt: "5.5rem", px: "2rem", textAlign: "center", justifyContent: "center" }}>
Expand Down
58 changes: 0 additions & 58 deletions src/components/pages/ImageMagnifier.jsx

This file was deleted.

Loading

0 comments on commit e109748

Please sign in to comment.