diff --git a/frontend/src/components/modals/user/userViewDeadline/userView.jsx b/frontend/src/components/modals/user/userViewDeadline/userView.jsx
index 50fe9bf7..25172c26 100644
--- a/frontend/src/components/modals/user/userViewDeadline/userView.jsx
+++ b/frontend/src/components/modals/user/userViewDeadline/userView.jsx
@@ -57,9 +57,7 @@ export default function UserViewDeadline({
{ label: '2 hours to deadline', checked: false },
]
const onchange = (index, isChecked) => {
- console.log(isChecked)
labels[index] = { ...labels[index], checked: isChecked }
- console.log(labels)
}
return (
diff --git a/frontend/src/components/nav/sortbar.jsx b/frontend/src/components/nav/sortbar.jsx
index 33b381ce..c66169d0 100644
--- a/frontend/src/components/nav/sortbar.jsx
+++ b/frontend/src/components/nav/sortbar.jsx
@@ -41,7 +41,6 @@ const Sortbar = () => {
}
const sortResults = sortData(initialData, value)
- console.log(sortResults)
dispatch({
type: actionTypes.SORT,
diff --git a/frontend/src/components/skeleton/skeleton.jsx b/frontend/src/components/skeleton/skeleton.jsx
new file mode 100644
index 00000000..f60a3884
--- /dev/null
+++ b/frontend/src/components/skeleton/skeleton.jsx
@@ -0,0 +1,74 @@
+import React from 'react'
+
+const Skeleton = ({ type, counter }) => {
+ const COUNTER = counter || 5
+
+ const TopMenuSkeleton = () => (
+
+ )
+
+ const CardSkeleton = () => (
+
+ )
+
+ if (type === 'top') return
+ if (type === 'card')
+ return (
+
+ {Array(COUNTER).fill()}
+
+ )
+
+ return (
+
+ {/*
*/}
+
+ {Array(COUNTER).fill()}
+
+
+ )
+}
+
+export default Skeleton
diff --git a/frontend/src/index.jsx b/frontend/src/index.jsx
index c55b1844..e36b91cf 100644
--- a/frontend/src/index.jsx
+++ b/frontend/src/index.jsx
@@ -7,8 +7,7 @@ import './styles/scroll.css'
import 'react-activity/dist/Spinner.css'
import { ModalContextProvider } from './context/ModalContext'
-import { RemindersContextProvider } from './context/RemindersContext'
-import { SortProvider } from './components/sort'
+// import { RemindersContextProvider } from './context/RemindersContext'
import { QueryClient, QueryClientProvider } from 'react-query'
const queryClient = new QueryClient()
@@ -16,13 +15,11 @@ const queryClient = new QueryClient()
ReactDOM.render(
-
-
-
-
-
-
-
+ {/* */}
+
+
+
+ {/* */}
,
document.getElementById('deadline_root')
diff --git a/frontend/src/pages/Upcoming/index.jsx b/frontend/src/pages/Upcoming/index.jsx
index c551144f..4fb482e9 100644
--- a/frontend/src/pages/Upcoming/index.jsx
+++ b/frontend/src/pages/Upcoming/index.jsx
@@ -1,82 +1,20 @@
import React from 'react'
-// import { useAllReminders } from '../../api/reminders'
+import { useAllReminders } from '../../api/reminders'
import DeadlineCard from '../../components/deadlineCard'
-import { Spinner } from 'react-activity'
+import Skeleton from '../../components/skeleton/skeleton'
const UpcomingPage = () => {
- // const { fetchedData, isPlaceholderData, isLoading } = useAllReminders()
- const isPlaceholderData = false
- const isLoading = false
-
- const mockArray = [
- {
- object_id: '614077c56173056af01b4ba8',
- title: 'Accounting - Spreadsheet',
- description:
- 'Create new sales spreadsheet for Creative Juices enterprise.',
- status: 'pending',
- startDate: '2021-08-31T00:00:00.000Z',
- dueDate: '2021-11-15T07:30:00.000Z',
- creator: 'Joan',
- assignee: 'accounting',
- priority: 'low',
- },
- {
- object_id: '614077c56173056af01b4br7',
- title: 'Website Launch',
- description:
- 'Finalise and relaunch our company website. We’ve got 24 hours guys.',
- status: 'pending',
- startDate: '2021-08-30T00:00:00.000Z',
- dueDate: '2021-09-17T00:00:00.000Z',
- creator: 'Joe',
- assignee: 'dev-team',
- priority: 'high',
- },
- {
- object_id: '614077c56173056af34b4br8',
- title: 'Logo Design',
- description: 'Redesign the edges of Fine touch LLC’s company logo.',
- status: 'completed',
- startDate: '2021-05-30T00:00:00.000Z',
- dueDate: '2021-09-23T00:00:00.000Z',
- creator: 'Mark',
- assignee: 'design-team',
- priority: 'medium',
- },
- {
- object_id: '614077c561sd33056af34b4dne',
- title: 'Frontend - Nav Fixes',
- description: 'Fix Powerhouse.com’s buggy navigation bar.',
- status: 'pending',
- startDate: '2021-08-01T00:00:00.000Z',
- dueDate: '2021-09-20T00:00:00.000Z',
- creator: 'Juliet',
- assignee: 'dev-team',
- priority: 'high',
- },
- {
- object_id: '414057c561sd354656af34b4dt',
- title: "COO's Birthday",
- description: 'Handle all the preparations for John’s surprise birthday.',
- status: 'pending',
- startDate: '2021-09-03T00:00:00.000Z',
- dueDate: '2021-12-23T00:00:00.000Z',
- creator: 'Peter',
- assignee: 'operations-team',
- priority: 'low',
- },
- ]
+ const { fetchedData, isPlaceholderData, isLoading } = useAllReminders()
return !isPlaceholderData && !isLoading ? (
- {mockArray.map((val) => (
+ {fetchedData.map((val) => (
{
) : (
-
+
)
}