mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 05:09:05 +00:00
Fix props
This commit is contained in:
@@ -42,7 +42,7 @@ export function TopicList({
|
||||
|
||||
const scrollToTopic = () => {
|
||||
const topicDiv = document.getElementById(
|
||||
`accordion-button-topic-${activeTopic?.id}`,
|
||||
`accordion-button-topic-${activeTopic?.id}`
|
||||
);
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -63,7 +63,7 @@ export function TopicList({
|
||||
const toggleScroll = (element) => {
|
||||
const bottom =
|
||||
Math.abs(
|
||||
element.scrollHeight - element.clientHeight - element.scrollTop,
|
||||
element.scrollHeight - element.clientHeight - element.scrollTop
|
||||
) < 2 || element.scrollHeight == element.clientHeight;
|
||||
if (!bottom && autoscrollEnabled) {
|
||||
setAutoscrollEnabled(false);
|
||||
@@ -97,7 +97,7 @@ export function TopicList({
|
||||
if (!participants.response) return;
|
||||
return (
|
||||
participants.response.find(
|
||||
(participant) => participant.speaker == speakerNumber,
|
||||
(participant) => participant.speaker == speakerNumber
|
||||
)?.name || `Speaker ${speakerNumber}`
|
||||
);
|
||||
};
|
||||
@@ -134,6 +134,8 @@ export function TopicList({
|
||||
overflowY={"auto"}
|
||||
h={"100%"}
|
||||
onScroll={handleScroll}
|
||||
width="full"
|
||||
padding={2}
|
||||
>
|
||||
{topics.length > 0 && (
|
||||
<Accordion
|
||||
@@ -146,17 +148,16 @@ export function TopicList({
|
||||
key={index}
|
||||
background={{
|
||||
base: "light",
|
||||
_hover: "gray.100",
|
||||
_focus: "gray.100",
|
||||
hover: "gray.100",
|
||||
focus: "gray.100",
|
||||
}}
|
||||
padding={2}
|
||||
id={`topic-${topic.id}`}
|
||||
>
|
||||
<Flex dir="row" letterSpacing={".2"}>
|
||||
<AccordionButton
|
||||
onClick={() => {
|
||||
setActiveTopic(
|
||||
activeTopic?.id == topic.id ? null : topic,
|
||||
activeTopic?.id == topic.id ? null : topic
|
||||
);
|
||||
}}
|
||||
>
|
||||
@@ -199,7 +200,7 @@ export function TopicList({
|
||||
fontSize={"sm"}
|
||||
color={generateHighContrastColor(
|
||||
`Speaker ${segment.speaker}`,
|
||||
[96, 165, 250],
|
||||
[96, 165, 250]
|
||||
)}
|
||||
>
|
||||
{" "}
|
||||
|
||||
Reference in New Issue
Block a user