mirror of
https://github.com/kou029w/quot.git
synced 2025-01-31 14:28:06 +00:00
Compare commits
2 commits
3cd4337c04
...
4c8e0a6fa7
Author | SHA1 | Date | |
---|---|---|---|
|
4c8e0a6fa7 | ||
a137a0a5c0 |
3 changed files with 3 additions and 5 deletions
|
@ -9,7 +9,7 @@
|
|||
"engines": {
|
||||
"node": "^18.7.0"
|
||||
},
|
||||
"packageManager": "npm@8.18.0",
|
||||
"packageManager": "npm@8.19.0",
|
||||
"dependencies": {
|
||||
"@exampledev/new.css": "^1.1.3",
|
||||
"@lexical/plain-text": "^0.3.11",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
function throttle<Fn extends (...args: any[]) => any>(
|
||||
fn: Fn,
|
||||
ms: number
|
||||
ms: number = 333
|
||||
): (...args: Parameters<Fn>) => void {
|
||||
let throttledFn = () => undefined;
|
||||
let throttled: boolean = false;
|
||||
|
|
|
@ -4,7 +4,6 @@ import Editor from "../components/editor";
|
|||
import beforeunload from "../helpers/beforeunload";
|
||||
import throttle from "../helpers/throttle";
|
||||
|
||||
const intervalMs = 333;
|
||||
const { block, unblock } = beforeunload();
|
||||
|
||||
async function updatePage(
|
||||
|
@ -50,8 +49,7 @@ export default (props: { id: number }) => {
|
|||
`/${content.text ? id.toString(16) : "new"}`
|
||||
);
|
||||
}
|
||||
},
|
||||
intervalMs
|
||||
}
|
||||
);
|
||||
|
||||
function onUpdatePage(content: Pages.RequestContentPage) {
|
||||
|
|
Loading…
Add table
Reference in a new issue