mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-09 18:53:38 +02:00
Ability to sync environments to folder (#207)
This commit is contained in:
@@ -4,7 +4,6 @@ import { format } from 'date-fns';
|
||||
import { hexy } from 'hexy';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { useMemo, useRef, useState } from 'react';
|
||||
import { useCopy } from '../hooks/useCopy';
|
||||
import { useFormatText } from '../hooks/useFormatText';
|
||||
import {
|
||||
activeWebsocketConnectionAtom,
|
||||
@@ -14,6 +13,7 @@ import {
|
||||
} from '../hooks/usePinnedWebsocketConnection';
|
||||
import { useStateWithDeps } from '../hooks/useStateWithDeps';
|
||||
import { languageFromContentType } from '../lib/contentType';
|
||||
import { copyToClipboard } from '../lib/copy';
|
||||
import { AutoScroller } from './core/AutoScroller';
|
||||
import { Banner } from './core/Banner';
|
||||
import { Button } from './core/Button';
|
||||
@@ -41,7 +41,6 @@ export function WebsocketResponsePane({ activeRequest }: Props) {
|
||||
|
||||
const activeConnection = useAtomValue(activeWebsocketConnectionAtom);
|
||||
const connections = useAtomValue(activeWebsocketConnectionsAtom);
|
||||
|
||||
const events = useWebsocketEvents(activeConnection?.id ?? null);
|
||||
|
||||
const activeEvent = useMemo(
|
||||
@@ -63,7 +62,6 @@ export function WebsocketResponsePane({ activeRequest }: Props) {
|
||||
|
||||
const language = languageFromContentType(null, message);
|
||||
const formattedMessage = useFormatText({ language, text: message, pretty: true });
|
||||
const copy = useCopy();
|
||||
|
||||
return (
|
||||
<SplitLayout
|
||||
@@ -151,7 +149,7 @@ export function WebsocketResponsePane({ activeRequest }: Props) {
|
||||
title="Copy message"
|
||||
icon="copy"
|
||||
size="xs"
|
||||
onClick={() => copy(formattedMessage.data ?? '')}
|
||||
onClick={() => copyToClipboard(formattedMessage.data ?? '')}
|
||||
/>
|
||||
</HStack>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user