chore: upgrade to react 19 beta and next 14 canary

This commit is contained in:
2024-05-19 14:53:00 +02:00
parent fe429295ef
commit 63e0be09e6
65 changed files with 2626 additions and 1898 deletions

View File

@@ -1,3 +1,4 @@
import { PropsWithChildren } from "react";
import { Metadata } from "next";
import { toolGroups } from "@/config/tools";
@@ -12,6 +13,6 @@ export const metadata: Metadata = {
},
};
export default function Layout({ children }: { children: React.ReactNode }) {
export default function Layout({ children }: PropsWithChildren) {
return children;
}

View File

@@ -1,6 +1,6 @@
"use client";
import { useCallback, useMemo, useState } from "react";
import { useState } from "react";
import { toolGroups } from "@/config/tools";
import { noOp } from "@/lib/base";
@@ -27,17 +27,14 @@ export default function Page() {
const output = transformText(input, mode);
const stats = useMemo(
() => ({
characters: countCharacters(input),
words: countWords(input),
lines: countLines(input),
bytes: countBytes(input),
}),
[input]
);
const stats = {
characters: countCharacters(input),
words: countWords(input),
lines: countLines(input),
bytes: countBytes(input),
};
const clearInput = useCallback(() => setInput(""), []);
const clearInput = () => setInput("");
const onInputChange: TextareaProps["onChange"] = e => setInput(e.currentTarget.value);
const onModeChange = (value: string) => {