Adding zustand and react-query (Settings Page) #95

Merged
rishighan merged 33 commits from qbittorrent-settings-form into main 2023-11-07 17:56:29 +00:00
3 changed files with 16 additions and 16 deletions
Showing only changes of commit c6e55a90ce - Show all commits

View File

@@ -85,6 +85,6 @@ export const getQBitTorrentClientInfo = (hostInfo) => async (dispatch) => {
console.log(bar); console.log(bar);
dispatch({ dispatch({
type: SETTINGS_QBITTORRENT_TORRENTS_LIST_FETCHED, type: SETTINGS_QBITTORRENT_TORRENTS_LIST_FETCHED,
data: foo, data: bar.data
}); });
}; };

View File

@@ -41,7 +41,7 @@ export const AirDCPPSettingsForm = (): ReactElement => {
initialValues={initFormData} initialValues={initFormData}
render={({ handleSubmit }) => ( render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit}>
<h2>AirDC++ Connection Information</h2> <h2>Configure AirDC++</h2>
<label className="label">AirDC++ Hostname</label> <label className="label">AirDC++ Hostname</label>
<div className="field has-addons"> <div className="field has-addons">
<p className="control"> <p className="control">

View File

@@ -34,14 +34,13 @@ export const QbittorrentConnectionForm = (): ReactElement => {
return ( return (
<> <>
<pre> {JSON.stringify(torrents, null, 4)} </pre>
<Form <Form
onSubmit={onSubmit} onSubmit={onSubmit}
// validate={} // validate={}
initialValues={qBittorrentSettings} initialValues={qBittorrentSettings}
render={({ handleSubmit }) => ( render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}> <form className="content" onSubmit={handleSubmit}>
<h2>Configure Qbittorrent</h2> <h2>Configure Qbittorrent</h2>
<label className="label">Qbittorrent Hostname</label> <label className="label">Qbittorrent Hostname</label>
<div className="field has-addons"> <div className="field has-addons">
@@ -126,6 +125,7 @@ export const QbittorrentConnectionForm = (): ReactElement => {
</form> </form>
)} )}
/> />
<pre> {JSON.stringify(torrents, null, 4)} </pre>
</> </>
); );
}; };