-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
687 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from "react"; | ||
import LoadingIcon from "@/icons/icon-loading.svg"; | ||
const Spinner = () => { | ||
return ( | ||
<div role="status" className="w-10 h-10 fixed bottom-10 right-10"> | ||
<LoadingIcon className="text-primary2 w-8 h-8 mr-2 animate-spin fill-white anima" /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Spinner; |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import mongoose from "mongoose"; | ||
const connectMongo = async () => | ||
mongoose.connect( | ||
process.env.DB || "mongodb://localhost:27017/kanban-web-app", | ||
{ useNewUrlParser: true } | ||
); | ||
export default connectMongo; |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import mongoose from "mongoose"; | ||
const { Schema, models } = mongoose; | ||
const dataSchema = new Schema({ | ||
boards: [ | ||
{ | ||
name: String, | ||
columns: [ | ||
{ | ||
name: String, | ||
tasks: [ | ||
{ | ||
title: String, | ||
description: String, | ||
status: String, | ||
subtasks: [{ title: String, isCompleted: Boolean }], | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
}); | ||
const BoardsModel = | ||
models.BoardsModel || mongoose.model("BoardsModel", dataSchema); | ||
export default BoardsModel; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.