mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Don't persist settings tab
This commit is contained in:
@@ -69,7 +69,6 @@ export const RequestPane = memo(function RequestPane({
|
||||
|
||||
const handleContentTypeChange = useCallback(
|
||||
async (contentType: string | null) => {
|
||||
console.log('UPDATE CONTENT TYPE', contentType);
|
||||
const headers = activeRequest.headers.filter((h) => h.name.toLowerCase() !== 'content-type');
|
||||
|
||||
if (contentType != null) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
||||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import { useKeyPressEvent, useLocalStorage } from 'react-use';
|
||||
import React, { useState } from 'react';
|
||||
import { useKeyPressEvent } from 'react-use';
|
||||
import { useOsInfo } from '../../hooks/useOsInfo';
|
||||
import { capitalize } from '../../lib/capitalize';
|
||||
import { HStack } from '../core/Stacks';
|
||||
@@ -20,7 +20,7 @@ const tabs = [Tab.General, Tab.Appearance];
|
||||
|
||||
export const Settings = () => {
|
||||
const osInfo = useOsInfo();
|
||||
const [tab, setTab] = useLocalStorage<string>('settings_tab', Tab.General);
|
||||
const [tab, setTab] = useState<string>(Tab.General);
|
||||
|
||||
// Close settings window on escape
|
||||
// TODO: Could this be put in a better place? Eg. in Rust key listener when creating the window
|
||||
|
||||
@@ -37,8 +37,8 @@ export function SettingsGeneral() {
|
||||
value={settings.updateChannel}
|
||||
onChange={(updateChannel) => updateSettings.mutate({ updateChannel })}
|
||||
options={[
|
||||
{ label: 'Release', value: 'stable' },
|
||||
{ label: 'Early Bird (Beta)', value: 'beta' },
|
||||
{ label: 'Stable (less frequent)', value: 'stable' },
|
||||
{ label: 'Beta (more frequent)', value: 'beta' },
|
||||
]}
|
||||
/>
|
||||
<IconButton
|
||||
|
||||
@@ -56,7 +56,7 @@ export function useIntrospectGraphQL(baseRequest: HttpRequest) {
|
||||
}
|
||||
|
||||
const { data } = JSON.parse(bodyText);
|
||||
console.log('Introspection response', data);
|
||||
console.log(`Got introspection response for ${baseRequest.url}`, data);
|
||||
await setIntrospection(data);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user