11import { useState } from "react" ;
22
33import AppFileSelect from "@/components/libresplit/AppFileSelect" ;
4- import { AppMarkdownCodeBlock } from "@/components/libresplit/AppMarkdownCodeBlock " ;
4+ import { AppSplitPreview } from "@/components/libresplit/AppSplitPreview " ;
55import init , { convert } from "@libresplit/libresplit-converter" ;
66import wasmUrl from "@libresplit/libresplit-converter/libresplit_converter_bg.wasm?url" ;
77
@@ -54,8 +54,8 @@ export function Converter() {
5454 } ;
5555
5656 return (
57- < div className = "space-y-4" >
58- < div className = "px-100 " >
57+ < div className = "flex h-[calc(100vh-64px-24px)] flex-col space-y-4 overflow-hidden " >
58+ < div className = "shrink-0 px-[100px] " >
5959 < AppFileSelect
6060 label = "Select LiveSplit file:"
6161 value = { selectedFile }
@@ -65,7 +65,7 @@ export function Converter() {
6565 />
6666 </ div >
6767
68- < div className = "flex items-center justify-center gap-2" >
68+ < div className = "flex shrink-0 items-center justify-center gap-2" >
6969 < button
7070 onClick = { handleSubmit }
7171 className = "rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700"
@@ -81,9 +81,15 @@ export function Converter() {
8181 </ button >
8282 </ div >
8383
84- < div className = "flex justify-center" >
85- { fileText && < AppMarkdownCodeBlock code = { fileText } language = "xml" /> }
86- { result && < AppMarkdownCodeBlock code = { result } language = "json" /> }
84+ < div className = "min-h-0 flex-1" >
85+ < div className = "flex h-full min-h-0 w-full items-stretch justify-center gap-4" >
86+ { fileText && (
87+ < AppSplitPreview text = { fileText } className = "h-full flex-1" />
88+ ) }
89+ { result && (
90+ < AppSplitPreview text = { result } className = "h-full flex-1" />
91+ ) }
92+ </ div >
8793 </ div >
8894 </ div >
8995 ) ;
0 commit comments