mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 03:13:33 +02:00
Prevent a bunch more stuff from re-rendering
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models';
|
||||
import { atom, useAtomValue } from 'jotai';
|
||||
import {fallbackRequestName} from "../lib/fallbackRequestName";
|
||||
import {jotaiStore} from "../lib/jotai";
|
||||
import { jotaiStore } from '../lib/jotai';
|
||||
import { activeRequestIdAtom } from './useActiveRequestId';
|
||||
import { grpcRequestsAtom } from './useGrpcRequests';
|
||||
import { httpRequestsAtom } from './useHttpRequests';
|
||||
@@ -21,11 +20,6 @@ export function getActiveRequest() {
|
||||
return jotaiStore.get(activeRequestAtom);
|
||||
}
|
||||
|
||||
export const activeRequestNameAtom = atom(get => {
|
||||
const activeRequest = get(activeRequestAtom);
|
||||
return fallbackRequestName(activeRequest);
|
||||
});
|
||||
|
||||
export function useActiveRequest<T extends keyof TypeMap>(
|
||||
model?: T | undefined,
|
||||
): TypeMap[T] | null {
|
||||
|
||||
Reference in New Issue
Block a user