mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-17 15:36:50 +00:00
Fix Grid & List Layout
This commit is contained in:
parent
88b9a833ff
commit
b7876ec995
@ -1,5 +1,4 @@
|
|||||||
import { ChangeEvent } from "react";
|
import { ChangeEvent } from "react";
|
||||||
import Cookies from "js-cookie";
|
|
||||||
|
|
||||||
interface SearchAndLayoutProps {
|
interface SearchAndLayoutProps {
|
||||||
search: string;
|
search: string;
|
||||||
|
|||||||
@ -13,7 +13,10 @@ const useSite = () => {
|
|||||||
const [siteId, setSiteId] = useState("");
|
const [siteId, setSiteId] = useState("");
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [currentPage, setCurrentPage] = useState(1);
|
const [currentPage, setCurrentPage] = useState(1);
|
||||||
const [itemPerPage, setItemPerPage] = useState(5);
|
const [itemPerPage, setItemPerPage] = useState(() => {
|
||||||
|
const savedValue = Cookies.get('sites-itemPerPage');
|
||||||
|
return savedValue ? parseInt(savedValue, 10) : 5;
|
||||||
|
});
|
||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
const [sites, setSites] = useState([]);
|
const [sites, setSites] = useState([]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user