parent
daf4e9db9c
commit
f752fdfba0
1 changed files with 2 additions and 20 deletions
|
@ -8,12 +8,6 @@ import Animation from './components/animation.jsx';
|
|||
|
||||
function OptionPage({data , onClicked}) {
|
||||
const backgroundSRC = `${import.meta.env.VITE_ASSETS_URL}/${data.background}`
|
||||
const [name] = useState(() => {
|
||||
return sessionStorage.getItem("name") || '';
|
||||
});
|
||||
|
||||
const DialogText = data.text ? data.text.replace("{name}", name) : null;
|
||||
const DialogName = data.name ? data.name.replace("{name}", name) : null;
|
||||
|
||||
return (
|
||||
<div
|
||||
|
@ -38,18 +32,6 @@ function OptionPage({data , onClicked}) {
|
|||
<div onClick={()=>onClicked(item.goTo-1)} key={i} className='optionBox title'>{item.text}</div>)
|
||||
}
|
||||
</div>
|
||||
{DialogName && DialogText && (
|
||||
<>
|
||||
<div style={{ width: '60vw' }}>
|
||||
<div className="nameBox title">
|
||||
{DialogName}
|
||||
</div>
|
||||
</div>
|
||||
<div className="textBox title" style={{ overflow: 'scroll' }}>
|
||||
{DialogText}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue