chore: remove unused variable reactDefinitionFile

This commit is contained in:
James Murdza 2024-07-04 20:18:36 -04:00
parent db1410f587
commit 08d562ee54
2 changed files with 0 additions and 13 deletions

View File

@ -63,14 +63,6 @@ const CodeEditor = dynamic(() => import("@/components/editor"), {
loading: () => <Loading />, loading: () => <Loading />,
}) })
function getReactDefinitionFile() {
const reactDefinitionFile = fs.readFileSync(
"node_modules/@types/react/index.d.ts",
"utf8"
)
return reactDefinitionFile
}
export default async function CodePage({ params }: { params: { id: string } }) { export default async function CodePage({ params }: { params: { id: string } }) {
const user = await currentUser() const user = await currentUser()
const sandboxId = params.id const sandboxId = params.id
@ -94,8 +86,6 @@ export default async function CodePage({ params }: { params: { id: string } }) {
return notFound() return notFound()
} }
const reactDefinitionFile = getReactDefinitionFile()
return ( return (
<div className="overflow-hidden overscroll-none w-screen flex flex-col h-screen bg-background"> <div className="overflow-hidden overscroll-none w-screen flex flex-col h-screen bg-background">
<Room id={sandboxId}> <Room id={sandboxId}>
@ -104,7 +94,6 @@ export default async function CodePage({ params }: { params: { id: string } }) {
<CodeEditor <CodeEditor
userData={userData} userData={userData}
sandboxData={sandboxData} sandboxData={sandboxData}
reactDefinitionFile={reactDefinitionFile}
/> />
</div> </div>
</Room> </Room>

View File

@ -35,11 +35,9 @@ import { ImperativePanelHandle } from "react-resizable-panels"
export default function CodeEditor({ export default function CodeEditor({
userData, userData,
sandboxData, sandboxData,
reactDefinitionFile,
}: { }: {
userData: User userData: User
sandboxData: Sandbox sandboxData: Sandbox
reactDefinitionFile: string
}) { }) {
const socketRef = useRef<Socket | null>(null); const socketRef = useRef<Socket | null>(null);