-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: simplify ModelEditor component and improve message handling (#154)
* refactor: simplify ModelEditor component and improve message handling * chore: update GitHub actions to use v4 for various steps in release workflow
- Loading branch information
1 parent
44d3948
commit 53a395f
Showing
3 changed files
with
59 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
'use client'; | ||
|
||
import React, { useEffect, useState } from 'react'; | ||
import React from 'react'; | ||
import { ModelEditor } from '../components/ModelEditor'; | ||
|
||
export default function ModelEditorPage() { | ||
const [initialValue, setInitialValue] = useState(''); | ||
|
||
useEffect(() => { | ||
const params = new URLSearchParams(window.location.search); | ||
const modelParam = params.get('model'); | ||
if (modelParam) { | ||
setInitialValue(decodeURIComponent(modelParam)); | ||
} | ||
}, []); | ||
|
||
return ( | ||
<div style={{ width: '100%', height: '100vh' }}> | ||
<ModelEditor initialValue={initialValue} /> | ||
<ModelEditor /> | ||
</div> | ||
); | ||
} |