-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Style : responsive component and style progressqueue
- Loading branch information
Showing
8 changed files
with
172 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
import { useSelector } from "react-redux" | ||
import { getExistingDeleteQueues } from "../services/queues" | ||
import { useCustomQuery } from "../utils" | ||
import { RootState } from "../store" | ||
import { Spinner } from "../ui" | ||
import ProgressQueue from "./ProgressQueue" | ||
|
||
import { useSelector } from "react-redux"; | ||
import { getExistingDeleteQueues } from "../services/queues"; | ||
import { useCustomQuery } from "../utils"; | ||
import { RootState } from "../store"; | ||
import { Spinner } from "../ui"; | ||
import ProgressQueue from "./ProgressQueue"; | ||
|
||
const DeleteQueues = () => { | ||
|
||
const currentUserId = useSelector((state: RootState) => state.user.currentUserId); | ||
|
||
const {data : existingDeleteQueues, isPending } = useCustomQuery<string[]>(['queue', 'delete', currentUserId.toString()], () => getExistingDeleteQueues(currentUserId)) | ||
const { data: existingDeleteQueues, isPending } = useCustomQuery<string[]>( | ||
['queue', 'delete', currentUserId.toString()], | ||
() => getExistingDeleteQueues(currentUserId) | ||
); | ||
|
||
if(isPending) return <Spinner/> | ||
if (isPending) return <Spinner />; | ||
|
||
return ( | ||
<div> | ||
<p>Progress Queue</p> | ||
{ | ||
existingDeleteQueues?.map((uuid)=>{ | ||
return <ProgressQueue uuid={uuid} /> | ||
}) | ||
} | ||
<div className="flex flex-col w-full p-4"> | ||
<p className="text-lg font-semibold text-center">Progress Queue</p> | ||
<div className="flex flex-col space-y-4"> | ||
{existingDeleteQueues?.map((uuid) => ( | ||
<ProgressQueue key={uuid} uuid={uuid} /> | ||
))} | ||
</div> | ||
</div> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default DeleteQueues | ||
export default DeleteQueues; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.