2025-05-06 15:36:55 +07:00
|
|
|
// src/ConversationPage.js
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
import '../css/global.css';
|
|
|
|
import '../css/textBox.css';
|
2025-05-06 17:08:03 +07:00
|
|
|
import '../css/nameBox.css';
|
|
|
|
import '../css/conversation.css'
|
|
|
|
import Animation from './components/animation.jsx';
|
2025-05-06 15:36:55 +07:00
|
|
|
|
|
|
|
function ConversationPage({data , onClicked}) {
|
|
|
|
const backgroundSRC = `${import.meta.env.VITE_ASSETS_URL}/${data.background}`
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
style={{
|
|
|
|
display: 'flex',
|
|
|
|
justifyContent: 'center',
|
|
|
|
alignItems: 'center',
|
2025-05-06 17:08:03 +07:00
|
|
|
height: '100svh',
|
|
|
|
width: '100svw',
|
2025-05-06 15:36:55 +07:00
|
|
|
flexDirection: 'column',
|
|
|
|
backgroundImage: `url(${backgroundSRC})`,
|
|
|
|
backgroundSize: 'cover',
|
|
|
|
backgroundPosition: 'center',
|
|
|
|
}}
|
|
|
|
>
|
2025-05-06 17:08:03 +07:00
|
|
|
<div className='spriteBox'>
|
|
|
|
<Animation src={`F${data.sprite}`}/>
|
2025-05-06 15:36:55 +07:00
|
|
|
</div>
|
2025-05-06 17:08:03 +07:00
|
|
|
<div style={{width:'60vw'}}>
|
|
|
|
<div className='nameBox title'>
|
|
|
|
{data.name}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='textBox title' style={{overflow: 'scroll',}}>
|
2025-05-06 15:36:55 +07:00
|
|
|
{data.text}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ConversationPage;
|