mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2026-01-30 05:02:13 +00:00
chore: upgrade to react 19 beta and next 14 canary
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useCallback, useState } from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { toolGroups } from "@/config/tools";
|
||||
import { decode } from "@/lib/jwt";
|
||||
@@ -20,7 +20,7 @@ export default function Page() {
|
||||
const header = h.map(x => JSON.stringify(x, null, 2)).unwrapOr("");
|
||||
const payload = p.map(x => JSON.stringify(x, null, 2)).unwrapOr("");
|
||||
|
||||
const clearJwt = useCallback(() => setJwt(""), []);
|
||||
const clearJwt = () => setJwt("");
|
||||
|
||||
const onJwtChange: TextareaProps["onChange"] = e => setJwt(e.currentTarget.value);
|
||||
|
||||
@@ -49,9 +49,11 @@ export default function Page() {
|
||||
</PageSection>
|
||||
<div className="flex flex-col gap-3">
|
||||
<PageSection title="Header" control={heaederControl}>
|
||||
{/* @ts-expect-error react 19 beta error */}
|
||||
<Editor height={180} language="json" value={header} options={{ readOnly: true }} />
|
||||
</PageSection>
|
||||
<PageSection title="Payload" control={payloadControl}>
|
||||
{/* @ts-expect-error react 19 beta error */}
|
||||
<Editor height={180} language="json" value={payload} options={{ readOnly: true }} />
|
||||
</PageSection>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user