mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-19 14:17:53 +01:00
Fix lint errors
This commit is contained in:
@@ -86,7 +86,7 @@ export function Sidebar({ className }: Props) {
|
||||
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
||||
const collapsed = useKeyValue<Record<string, boolean>>({
|
||||
key: ['sidebar_collapsed', activeWorkspace?.id ?? 'n/a'],
|
||||
defaultValue: {},
|
||||
fallback: {},
|
||||
namespace: NAMESPACE_NO_SYNC,
|
||||
});
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export function useActiveCookieJar() {
|
||||
const kv = useKeyValue<string | null>({
|
||||
namespace: NAMESPACE_GLOBAL,
|
||||
key: ['activeCookieJar', workspaceId ?? 'n/a'],
|
||||
defaultValue: null,
|
||||
fallback: null,
|
||||
});
|
||||
|
||||
const activeCookieJar = cookieJars.find((cookieJar) => cookieJar.id === kv.value);
|
||||
|
||||
@@ -54,6 +54,6 @@ export function useCreateDropdownItems({
|
||||
},
|
||||
]) as DropdownItem[]),
|
||||
],
|
||||
[createFolder, createGrpcRequest, createHttpRequest, hideFolder],
|
||||
[createFolder, createGrpcRequest, createHttpRequest, folderId, hideFolder, hideIcons],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useKeyValue } from './useKeyValue';
|
||||
|
||||
const kvKey = (workspaceId: string) => 'recent_environments::' + workspaceId;
|
||||
const namespace = NAMESPACE_GLOBAL;
|
||||
const defaultValue: string[] = [];
|
||||
const fallback: string[] = [];
|
||||
|
||||
export function useRecentEnvironments() {
|
||||
const environments = useEnvironments();
|
||||
@@ -16,7 +16,7 @@ export function useRecentEnvironments() {
|
||||
const kv = useKeyValue<string[]>({
|
||||
key: kvKey(activeWorkspaceId ?? 'n/a'),
|
||||
namespace,
|
||||
defaultValue,
|
||||
fallback,
|
||||
});
|
||||
|
||||
// Set history when active request changes
|
||||
@@ -41,6 +41,6 @@ export async function getRecentEnvironments(workspaceId: string) {
|
||||
return getKeyValue<string[]>({
|
||||
namespace,
|
||||
key: kvKey(workspaceId),
|
||||
fallback: defaultValue,
|
||||
fallback,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useKeyValue } from './useKeyValue';
|
||||
|
||||
const kvKey = (workspaceId: string) => 'recent_requests::' + workspaceId;
|
||||
const namespace = NAMESPACE_GLOBAL;
|
||||
const defaultValue: string[] = [];
|
||||
const fallback: string[] = [];
|
||||
|
||||
export function useRecentRequests() {
|
||||
const httpRequests = useHttpRequests();
|
||||
@@ -20,7 +20,7 @@ export function useRecentRequests() {
|
||||
const kv = useKeyValue<string[]>({
|
||||
key: kvKey(activeWorkspaceId ?? 'n/a'),
|
||||
namespace,
|
||||
defaultValue,
|
||||
fallback,
|
||||
});
|
||||
|
||||
// Set history when active request changes
|
||||
@@ -45,6 +45,6 @@ export async function getRecentRequests(workspaceId: string) {
|
||||
return getKeyValue<string[]>({
|
||||
namespace,
|
||||
key: kvKey(workspaceId),
|
||||
fallback: defaultValue,
|
||||
fallback,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useWorkspaces } from './useWorkspaces';
|
||||
|
||||
const kvKey = () => 'recent_workspaces';
|
||||
const namespace = NAMESPACE_GLOBAL;
|
||||
const defaultValue: string[] = [];
|
||||
const fallback: string[] = [];
|
||||
|
||||
export function useRecentWorkspaces() {
|
||||
const workspaces = useWorkspaces();
|
||||
@@ -14,7 +14,7 @@ export function useRecentWorkspaces() {
|
||||
const kv = useKeyValue<string[]>({
|
||||
key: kvKey(),
|
||||
namespace,
|
||||
defaultValue,
|
||||
fallback,
|
||||
});
|
||||
|
||||
// Set history when active request changes
|
||||
@@ -39,6 +39,6 @@ export async function getRecentWorkspaces() {
|
||||
return getKeyValue<string[]>({
|
||||
namespace,
|
||||
key: kvKey(),
|
||||
fallback: defaultValue,
|
||||
fallback: fallback,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export function useSidebarHidden() {
|
||||
const { set, value } = useKeyValue<boolean>({
|
||||
namespace: NAMESPACE_NO_SYNC,
|
||||
key: ['sidebar_hidden', activeWorkspaceId ?? 'n/a'],
|
||||
defaultValue: false,
|
||||
fallback: false,
|
||||
});
|
||||
|
||||
return useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user