mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Refactor HandleBackup component to improve database selection logic. Simplify the initialization of the database field in the form by using a conditional expression for better readability and maintainability.
This commit is contained in:
parent
c4045795ee
commit
0f67e9e222
@ -228,8 +228,11 @@ export const HandleBackup = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.reset({
|
form.reset({
|
||||||
database:
|
database: backup?.database
|
||||||
(backup?.database ?? databaseType === "web-server") ? "dokploy" : "",
|
? backup?.database
|
||||||
|
: databaseType === "web-server"
|
||||||
|
? "dokploy"
|
||||||
|
: "",
|
||||||
destinationId: backup?.destinationId ?? "",
|
destinationId: backup?.destinationId ?? "",
|
||||||
enabled: backup?.enabled ?? true,
|
enabled: backup?.enabled ?? true,
|
||||||
prefix: backup?.prefix ?? "/",
|
prefix: backup?.prefix ?? "/",
|
||||||
|
Loading…
Reference in New Issue
Block a user