Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Commit

Permalink
fix: replace onClick with onPress in NextUI button components
Browse files Browse the repository at this point in the history
  • Loading branch information
pompurin404 committed Feb 3, 2025
1 parent 7c8661e commit 4b7ab04
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/renderer/src/components/base/collapse-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const CollapseInput: React.FC<CollapseInputProps> = (props) => {
<FaSearch title={title} />
</div>
}
onClick={(e) => {
onPress={(e) => {
e.stopPropagation()
inputRef.current?.focus()
}}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/settings/mihomo-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const MihomoConfig: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() => setPauseSSIDInput(pauseSSIDInput.filter((_, i) => i !== index))}
onPress={() => setPauseSSIDInput(pauseSSIDInput.filter((_, i) => i !== index))}
>
<MdDeleteForever className="text-lg" />
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const WebdavRestoreModal: React.FC<Props> = (props) => {
color="warning"
variant="flat"
className="ml-2"
onClick={async () => {
onPress={async () => {
try {
await webdavDelete(filename)
setFilenames(filenames.filter((name) => name !== filename))
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/pages/dns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const DNS: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() => handleListChange(type, '', index)}
onPress={() => handleListChange(type, '', index)}
>
<MdDeleteForever className="text-lg" />
</Button>
Expand Down Expand Up @@ -294,7 +294,7 @@ const DNS: React.FC = () => {
color="warning"
variant="flat"
className="ml-2"
onClick={() => handleSubkeyChange('nameserverPolicy', '', '', index)}
onPress={() => handleSubkeyChange('nameserverPolicy', '', '', index)}
>
<MdDeleteForever className="text-lg" />
</Button>
Expand Down Expand Up @@ -360,7 +360,7 @@ const DNS: React.FC = () => {
color="warning"
variant="flat"
className="ml-2"
onClick={() => handleSubkeyChange('hosts', '', '', index)}
onPress={() => handleSubkeyChange('hosts', '', '', index)}
>
<MdDeleteForever className="text-lg" />
</Button>
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/src/pages/mihomo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ const Mihomo: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() =>
onPress={() =>
setLanAllowedIpsInput(lanAllowedIpsInput.filter((_, i) => i !== index))
}
>
Expand Down Expand Up @@ -455,7 +455,7 @@ const Mihomo: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() =>
onPress={() =>
setLanDisallowedIpsInput(
lanDisallowedIpsInput.filter((_, i) => i !== index)
)
Expand Down Expand Up @@ -533,7 +533,7 @@ const Mihomo: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() =>
onPress={() =>
setAuthenticationInput(authenticationInput.filter((_, i) => i !== index))
}
>
Expand Down Expand Up @@ -585,7 +585,7 @@ const Mihomo: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() =>
onPress={() =>
setSkipAuthPrefixesInput(
skipAuthPrefixesInput.filter((_, i) => i !== index)
)
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/pages/sniffer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const Sniffer: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() => handleListChange(type, '', index)}
onPress={() => handleListChange(type, '', index)}
>
<MdDeleteForever className="text-lg" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/pages/syspeoxy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const Sysproxy: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() => handleBypassChange('', index)}
onPress={() => handleBypassChange('', index)}
>
<MdDeleteForever className="text-lg" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/pages/tun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const Tun: React.FC = () => {
size="sm"
variant="flat"
color="warning"
onClick={() => handleExcludeAddressChange('', index)}
onPress={() => handleExcludeAddressChange('', index)}
>
<MdDeleteForever className="text-lg" />
</Button>
Expand Down

0 comments on commit 4b7ab04

Please sign in to comment.