mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
Simplified code
This commit is contained in:
@@ -56,11 +56,7 @@ export default function TranscriptDetails(details: TranscriptDetails) {
|
||||
.replace(/ +/g, " ")
|
||||
.trim() || "";
|
||||
|
||||
if (
|
||||
(transcript?.response?.longSummary === null || true) &&
|
||||
transcript &&
|
||||
transcript.response
|
||||
) {
|
||||
if (transcript && transcript.response) {
|
||||
if (transcript.error || topics?.error) {
|
||||
return (
|
||||
<Modal
|
||||
@@ -82,10 +78,6 @@ export default function TranscriptDetails(details: TranscriptDetails) {
|
||||
topics={topics ? topics.topics : null}
|
||||
show={showModal}
|
||||
setShow={(v) => setShowModal(v)}
|
||||
title={transcript?.response?.title}
|
||||
summary={transcript?.response?.longSummary}
|
||||
date={transcript?.response?.createdAt}
|
||||
url={window.location.href}
|
||||
/>
|
||||
)}
|
||||
<div className="flex flex-col">
|
||||
|
||||
@@ -1,25 +1,12 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import SelectSearch from "react-select-search";
|
||||
import {
|
||||
getZulipMessage,
|
||||
sendZulipMessage,
|
||||
ZULIP_MSG_MAX_LENGTH,
|
||||
} from "../../../lib/zulip";
|
||||
import { Transcript } from "../webSocketTypes";
|
||||
import {
|
||||
GetTranscript,
|
||||
GetTranscriptSegmentTopic,
|
||||
GetTranscriptTopic,
|
||||
} from "../../../api";
|
||||
import { getZulipMessage, sendZulipMessage } from "../../../lib/zulip";
|
||||
import { GetTranscript, GetTranscriptTopic } from "../../../api";
|
||||
import "react-select-search/style.css";
|
||||
|
||||
type ShareModal = {
|
||||
show: boolean;
|
||||
setShow: (show: boolean) => void;
|
||||
title: string;
|
||||
url: string;
|
||||
summary: string;
|
||||
date: string;
|
||||
transcript: GetTranscript | null;
|
||||
topics: GetTranscriptTopic[] | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user