Skip to content

Commit

Permalink
adjustments on pagination and order item
Browse files Browse the repository at this point in the history
  • Loading branch information
swordfest committed Feb 22, 2024
1 parent ba8333f commit 1d251d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
10 changes: 0 additions & 10 deletions components/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import { Proxies } from "../libs/data";
import { proxiesObj, pageCounterState } from "../libs/store";

export default function Pagination(props: any) {
// const proxies: Proxies = useRecoilValue(proxiesObj)
const [prox, setProx] = useRecoilState<Proxies>(proxiesObj);
const [pageCounter, setPageCounter] =
useRecoilState<number>(pageCounterState);
// const [page, setPage] = useState(pageCounter)

const handleFirst = () => {
setPageCounter(1);
Expand Down Expand Up @@ -78,16 +76,8 @@ export default function Pagination(props: any) {
e.currentTarget.value = ""
e.currentTarget.blur()
}
// e.key === "Enter" &&
// setPageCounter(parseInt(e.currentTarget.value));
// e.currentTarget.value == "";
}
}}
// onChange={(e) => {
// if (parseInt(e.currentTarget.value) >= 0 && parseInt(e.currentTarget.value) <= prox.total_pages) {
// setPageCounter(parseInt(e.currentTarget.value));
// }
// }}
/>
{`of ${prox?.total_pages}`}
</div>
Expand Down
16 changes: 5 additions & 11 deletions components/serverCol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from "@tabler/icons-react";
import NewFeature from "./newFeature";
import NewServer from "./newServer";
import Link from "next/link";

export default function ServerCol(dataServer: { proxy: any }) {
const [timeCopy, setTimeCopy] = useState(false);
Expand All @@ -28,7 +29,7 @@ export default function ServerCol(dataServer: { proxy: any }) {
useEffect(() => {
const view = JSON.parse(localStorage.getItem("viewMode")!);
setViewMode(view);
}, [viewLayout]);
}, [viewLayout, setViewMode]);

const handleQR = () => {
setProxID(dataServer.proxy.id);
Expand All @@ -43,11 +44,6 @@ export default function ServerCol(dataServer: { proxy: any }) {
console.log(localX, localY);
};

// useEffect(() => {
// setHasMounted(true);
// },[]);

// after:contents-[''] after:absolute after:-z-10 after:w-8 after:h-8 after:rounded-full after:bg-white ${hasMounted && style}
return (
<div
ref={ref}
Expand Down Expand Up @@ -175,16 +171,14 @@ export default function ServerCol(dataServer: { proxy: any }) {
<IconQrcode />
</button>

<a
href={
"https://shadowmere.akiel.dev/" + dataServer.proxy.id + "/config"
}
<Link
title="Download"
data-umami-event={"Download"}
href={`https://shadowmere.akiel.dev/${dataServer.proxy.id}/config`}
className="opt-descargar w-4 h-4 sm:w-10 sm:h-10 rounded-md flex items-center justify-center cursor-pointer hover:bg-[#EBEBEB] dark:hover:bg-[#1B1B1B] active:bg-[#D7D7D7] dark:active:bg-[#111111] transition-all duration-150 active:scale-[95%]"
>
<IconDownload />
</a>
</Link>
</div>
</div>
);
Expand Down

0 comments on commit 1d251d2

Please sign in to comment.