more
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user