-
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.
# This is a combination of 5 commits.
# This is the 1st commit message: Merge # This is the commit message #2: Update readme # This is the commit message #3: Only writting users' pointer are displayed # This is the commit message #4: Automatically collects notes older than 2 weeks # This is the commit message #5: typo
- Loading branch information
Showing
13 changed files
with
510 additions
and
184 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
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import Head from "next/head"; | ||
import Script from "next/script"; | ||
import loadingMessages from "../../loading_messages"; | ||
import { useEffect, useState } from "react"; | ||
import { FullScreenButton } from "../../components/FullScreenButton"; | ||
import { useRouter } from "next/router"; | ||
import Canvas from "../../components/Canvas"; | ||
import { IoIosUndo } from "react-icons/io"; | ||
import { TbEraser, TbEraserOff } from "react-icons/tb"; | ||
import { FaPencilAlt } from "react-icons/fa"; | ||
|
||
export default function Note() { | ||
const router = useRouter(); | ||
const { id } = router.query; | ||
|
||
const [messageIdx, setMessageIdx] = useState(null); | ||
|
||
useEffect(() => { | ||
setMessageIdx(() => Math.floor(Math.random() * loadingMessages.length)); | ||
}, []); | ||
|
||
const isMessageVisible = messageIdx != null; | ||
console.log(messageIdx); | ||
console.log(isMessageVisible); | ||
|
||
// TODO check authentication here with a fetch | ||
|
||
if (false) { | ||
return ( | ||
<div className="grid h-screen place-items-center bg-gray-100 animate-pulse"> | ||
<div className="flex flex-col text-center w-96 h-48 justify-around "> | ||
<h1 className="font-bold text-4xl">Your note is loading</h1> | ||
<span | ||
className={`${ | ||
isMessageVisible ? "opacity-100" : "opacity-0" | ||
} font-light transition-opacity italic text-xl`} | ||
> | ||
{loadingMessages[messageIdx || 0]} | ||
</span> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
return ( | ||
<div> | ||
<Head> | ||
<title>{id ? `Inck/${id}` : "Inck"}</title> | ||
<meta name="description" content="The only ink that you will ever need" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
</Head> | ||
|
||
<Canvas /> | ||
<FullScreenButton /> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
export default function Test() { | ||
|
||
return ( | ||
<div> | ||
Bad credentials | ||
</div> | ||
) | ||
|
||
} |
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.