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