mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2026-01-27 12:34:23 +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 * as baselib from "@/lib/base";
|
||||
@@ -48,10 +48,10 @@ export default function Page() {
|
||||
}
|
||||
};
|
||||
|
||||
const trySetDec = useCallback((value: string) => trySetInt(10)(value), []);
|
||||
const trySetHex = useCallback((value: string) => trySetInt(16)(value), []);
|
||||
const trySetOct = useCallback((value: string) => trySetInt(8)(value), []);
|
||||
const trySetBin = useCallback((value: string) => trySetInt(2)(value), []);
|
||||
const trySetDec = (value: string) => trySetInt(10)(value);
|
||||
const trySetHex = (value: string) => trySetInt(16)(value);
|
||||
const trySetOct = (value: string) => trySetInt(8)(value);
|
||||
const trySetBin = (value: string) => trySetInt(2)(value);
|
||||
|
||||
const onDecChange: InputProps["onChange"] = e => trySetDec(e.currentTarget.value);
|
||||
const onHexChange: InputProps["onChange"] = e => trySetHex(e.currentTarget.value);
|
||||
|
||||
Reference in New Issue
Block a user