From 21fac1d3909e3445df98084c31855d0cd7a8e493 Mon Sep 17 00:00:00 2001 From: YanYuan Date: Fri, 13 Sep 2024 22:38:43 +0800 Subject: [PATCH] fix: fix build err --- src/components/SideBar.tsx | 6 +----- src/utils/starknet.ts | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index 7662062..3c76d2d 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -1,13 +1,11 @@ import { Button } from "@/components/ui/button"; import { Cog, Files, Info, SquareCode } from "lucide-react"; -import { usePathname, useRouter, useSearchParams } from "next/navigation"; +import { usePathname, useRouter } from "next/navigation"; import { Tooltip } from "@/components/Tooltip"; import logo from "@/assets/logo.png"; -import { createQueryString } from "@/utils/common"; export enum PageEnum { EDITOR = "/", - DEPLOY = 'deploy', SETTING = "setting", ABOUT = "about" } @@ -45,8 +43,6 @@ const pages = [ export const SideBar = () => { const router = useRouter(); const pathname = usePathname(); - const searchParams = useSearchParams(); - const tab = searchParams.get('tab') as TabEnum; console.log(pathname) const handleClick = (v: string) => { diff --git a/src/utils/starknet.ts b/src/utils/starknet.ts index 7f44d26..e1e84dc 100644 --- a/src/utils/starknet.ts +++ b/src/utils/starknet.ts @@ -4,7 +4,7 @@ import {Contract} from "@/types"; export async function genContractData ( contractName: string, compileResult: string, -): Promise { +): Promise | null> { const data = JSON.parse(compileResult) // const sierra = data.sierra_program; // const casm = await JSON.parse(casmFile)