Skip to content

Commit

Permalink
fix: fixes to what is displayed if not logged only tailwind class
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioAlonsoRoman committed Aug 19, 2024
1 parent 4400341 commit 6f312b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions src/components/Dropdowns/DropdownUpdateState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const DropdownUpdateState: React.FC<DropdownUpdateStateProps> = ({dts}) =
const dropdown = useRef<any>(null);
const auth = useAuth();
const router = useRouter();
const listServices = document.getElementById('list-services');

// close on click outside
useEffect(() => {
Expand Down Expand Up @@ -43,18 +42,6 @@ export const DropdownUpdateState: React.FC<DropdownUpdateStateProps> = ({dts}) =
return () => document.removeEventListener("keydown", keyHandler);
});

// resize of the window
useEffect(() => {
window.addEventListener('resize', () => {
if(Number(window.innerWidth) < 1300){
listServices?.classList.add('overflow-x-auto');
}
else{
listServices?.classList.remove('overflow-x-auto');
}
})
})

function setStyleState(state: string): string {
let color = 'text-black';
color = 'ENABLED' === state ? 'text-success dark:text-success' : 'DISABLED' === state ? 'text-danger dark:text-danger' : 'EDITING' === state ? 'text-warning dark:text-warning' : 'text-black dark:text-white'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Services/DtsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function DtsList() {

if (auth.isAuthenticated) {
return (
<div className="rounded-sm border border-stroke bg-white px-5 pb-2.5 pt-6 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1" id="list-services">
<div className="xsm:overflow-x-auto 2xsm:overflow-x-auto sm:overflow-x-auto md:overflow-x-auto lg:overflow-x-auto xl:overflow-x-visible 2xl:overflow-x-visible 3xl:overflow-x-visible rounded-sm border border-stroke px-5 pb-2.5 pt-6 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1" id="list-services">
<div className="flex justify-between items-center mb-6">
<div className="flex items-left">
<table>
Expand Down

0 comments on commit 6f312b3

Please sign in to comment.