This commit is contained in:
Kenneth Jannette
2024-01-12 17:24:13 -06:00
parent 8b11fae765
commit 64eab17924

View File

@@ -4,6 +4,7 @@ import { AppContext } from "../../Hooks/useContext/appContext";
import SelectDropdown from "../../pageElements/SelectDropdown"; import SelectDropdown from "../../pageElements/SelectDropdown";
import { DocCard } from "../../pageElements/Cards"; import { DocCard } from "../../pageElements/Cards";
import { db } from "../../firebase"; import { db } from "../../firebase";
import MobileContent from "../MobileContent";
import { import {
collection, collection,
deleteDoc, deleteDoc,
@@ -18,6 +19,8 @@ import ConfirmModal from "../Modals/ConfirmModal";
import "../../styles/doclist-page.scss"; import "../../styles/doclist-page.scss";
const DocumentListPage = ({ perPage }) => { const DocumentListPage = ({ perPage }) => {
const size = window.innerWidth < 440;
const [isMobile, setIsMobile] = useState(size);
const navigate = useNavigate(); const navigate = useNavigate();
const [showDeleteModal, setShowDeleteModal] = useState(false); const [showDeleteModal, setShowDeleteModal] = useState(false);
const [selectedDocumentId, setSelectedDocumentId] = useState(null); const [selectedDocumentId, setSelectedDocumentId] = useState(null);
@@ -164,7 +167,8 @@ const DocumentListPage = ({ perPage }) => {
if (!group) { if (!group) {
return null; return null;
} }
console.log("allDocs", allDocs);
const DesktopContent = () => {
return ( return (
<> <>
<div className="doc-list-header"> <div className="doc-list-header">
@@ -220,8 +224,8 @@ const DocumentListPage = ({ perPage }) => {
<li> <li>
{" "} {" "}
Click "View Case" to select the case with which your Click "View Case" to select the case with which your
document will be associated. This will open the Case Detail document will be associated. This will open the Case
view.{" "} Detail view.{" "}
</li> </li>
<li className="nodocs-list-item"> <li className="nodocs-list-item">
Note: If you have not yet created any cases, you will need Note: If you have not yet created any cases, you will need
@@ -263,4 +267,7 @@ const DocumentListPage = ({ perPage }) => {
); );
}; };
return isMobile ? <MobileContent /> : <DesktopContent />;
};
export default DocumentListPage; export default DocumentListPage;