@@ -152,71 +152,64 @@ export function MessageExporter() {
152
152
index = { currentStepIndex }
153
153
onStepChange = { setCurrentStepIndex }
154
154
/>
155
-
156
- < div className = { styles [ "message-exporter-body" ] } >
157
- { currentStep . value === "select" && (
158
- < >
159
- < List >
160
- < ListItem
161
- title = { Locale . Export . Format . Title }
162
- subTitle = { Locale . Export . Format . SubTitle }
163
- >
164
- < Select
165
- value = { exportConfig . format }
166
- onChange = { ( e ) =>
167
- updateExportConfig (
168
- ( config ) =>
169
- ( config . format = e . currentTarget . value as ExportFormat ) ,
170
- )
171
- }
172
- >
173
- { formats . map ( ( f ) => (
174
- < option key = { f } value = { f } >
175
- { f }
176
- </ option >
177
- ) ) }
178
- </ Select >
179
- </ ListItem >
180
- < ListItem
181
- title = { Locale . Export . IncludeContext . Title }
182
- subTitle = { Locale . Export . IncludeContext . SubTitle }
183
- >
184
- < input
185
- type = "checkbox"
186
- checked = { exportConfig . includeContext }
187
- onChange = { ( e ) => {
188
- updateExportConfig (
189
- ( config ) =>
190
- ( config . includeContext = e . currentTarget . checked ) ,
191
- ) ;
192
- } }
193
- > </ input >
194
- </ ListItem >
195
- </ List >
196
- < MessageSelector
197
- selection = { selection }
198
- updateSelection = { updateSelection }
199
- defaultSelectAll
200
- />
201
- </ >
202
- ) }
203
-
204
- { currentStep . value === "preview" && (
205
- < >
206
- { exportConfig . format === "text" ? (
207
- < MarkdownPreviewer
208
- messages = { selectedMessages }
209
- topic = { session . topic }
210
- />
211
- ) : (
212
- < ImagePreviewer
213
- messages = { selectedMessages }
214
- topic = { session . topic }
215
- />
216
- ) }
217
- </ >
218
- ) }
155
+ < div
156
+ className = { styles [ "message-exporter-body" ] }
157
+ style = { currentStep . value !== "select" ? { display : "none" } : { } }
158
+ >
159
+ < List >
160
+ < ListItem
161
+ title = { Locale . Export . Format . Title }
162
+ subTitle = { Locale . Export . Format . SubTitle }
163
+ >
164
+ < Select
165
+ value = { exportConfig . format }
166
+ onChange = { ( e ) =>
167
+ updateExportConfig (
168
+ ( config ) =>
169
+ ( config . format = e . currentTarget . value as ExportFormat ) ,
170
+ )
171
+ }
172
+ >
173
+ { formats . map ( ( f ) => (
174
+ < option key = { f } value = { f } >
175
+ { f }
176
+ </ option >
177
+ ) ) }
178
+ </ Select >
179
+ </ ListItem >
180
+ < ListItem
181
+ title = { Locale . Export . IncludeContext . Title }
182
+ subTitle = { Locale . Export . IncludeContext . SubTitle }
183
+ >
184
+ < input
185
+ type = "checkbox"
186
+ checked = { exportConfig . includeContext }
187
+ onChange = { ( e ) => {
188
+ updateExportConfig (
189
+ ( config ) => ( config . includeContext = e . currentTarget . checked ) ,
190
+ ) ;
191
+ } }
192
+ > </ input >
193
+ </ ListItem >
194
+ </ List >
195
+ < MessageSelector
196
+ selection = { selection }
197
+ updateSelection = { updateSelection }
198
+ defaultSelectAll
199
+ />
219
200
</ div >
201
+ { currentStep . value === "preview" && (
202
+ < div className = { styles [ "message-exporter-body" ] } >
203
+ { exportConfig . format === "text" ? (
204
+ < MarkdownPreviewer
205
+ messages = { selectedMessages }
206
+ topic = { session . topic }
207
+ />
208
+ ) : (
209
+ < ImagePreviewer messages = { selectedMessages } topic = { session . topic } />
210
+ ) }
211
+ </ div >
212
+ ) }
220
213
</ >
221
214
) ;
222
215
}
0 commit comments