-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed derived atom from async cookies atom (#259)
- Loading branch information
1 parent
1141903
commit 65960fb
Showing
5 changed files
with
60 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { TextField } from '@mui/material' | ||
import { useAtom, useAtomValue } from 'jotai' | ||
import { customArgsState } from '../atoms/downloadTemplate' | ||
import { settingsState } from '../atoms/settings' | ||
import { useI18n } from '../hooks/useI18n' | ||
import { useEffect } from 'react' | ||
|
||
const CustomArgsTextField: React.FC = () => { | ||
const { i18n } = useI18n() | ||
|
||
const settings = useAtomValue(settingsState) | ||
|
||
const [customArgs, setCustomArgs] = useAtom(customArgsState) | ||
|
||
useEffect(() => { | ||
setCustomArgs('') | ||
}, []) | ||
|
||
const handleCustomArgsChange = (e: React.ChangeEvent<HTMLInputElement>) => { | ||
setCustomArgs(e.target.value) | ||
} | ||
|
||
return ( | ||
<TextField | ||
fullWidth | ||
label={i18n.t('customArgsInput')} | ||
variant="outlined" | ||
onChange={handleCustomArgsChange} | ||
value={customArgs} | ||
disabled={settings.formatSelection} | ||
/> | ||
) | ||
} | ||
|
||
export default CustomArgsTextField |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.