diff --git a/app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx b/app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx index 7b708e267c08..fcc60eaf4244 100644 --- a/app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx +++ b/app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx @@ -67,7 +67,6 @@ const CommitLabelBranchText = styled(Text)` whitespace: nowrap; `; -const FIRST_COMMIT = "First Commit"; const NO_CHANGES_TO_COMMIT = "No changes to commit"; interface TabDeployViewProps { @@ -83,9 +82,7 @@ interface TabDeployViewProps { isFetchStatusLoading: boolean; isPullFailing: boolean; isPullLoading: boolean; - lastDeployedAt: string | null; pull: () => void; - remoteUrl: string | null; statusBehindCount: number; statusIsClean: boolean; } @@ -103,18 +100,14 @@ function TabDeployView({ isFetchStatusLoading = false, isPullFailing = false, isPullLoading = false, - lastDeployedAt = null, pull = noop, - remoteUrl = null, statusBehindCount = 0, statusIsClean = false, }: TabDeployViewProps) { const [hasSubmitted, setHasSubmitted] = useState(false); const hasChangesToCommit = !statusIsClean; const commitInputRef = useRef(null); - const [commitMessage, setCommitMessage] = useState( - remoteUrl && lastDeployedAt ? "" : FIRST_COMMIT, - ); + const [commitMessage, setCommitMessage] = useState(""); const [shouldDiscard, setShouldDiscard] = useState(false); const [isDiscarding, setIsDiscarding] = useState(isDiscardLoading); const [showDiscardWarning, setShowDiscardWarning] = useState(false); diff --git a/app/client/src/git/components/OpsModal/TabDeploy/index.tsx b/app/client/src/git/components/OpsModal/TabDeploy/index.tsx index aa4c47cf23eb..7ea10bb3e2d7 100644 --- a/app/client/src/git/components/OpsModal/TabDeploy/index.tsx +++ b/app/client/src/git/components/OpsModal/TabDeploy/index.tsx @@ -1,16 +1,12 @@ import React from "react"; import TabDeployView from "./TabDeployView"; -import { useGitContext } from "git/components/GitContextProvider"; -import useMetadata from "git/hooks/useMetadata"; import useBranches from "git/hooks/useBranches"; import useCommit from "git/hooks/useCommit"; import useDiscard from "git/hooks/useDiscard"; import usePull from "git/hooks/usePull"; import useStatus from "git/hooks/useStatus"; -import type { GitApplicationArtifact } from "git/types"; export default function TabDeploy() { - const { artifact } = useGitContext(); const { clearCommitError, commit, commitError, isCommitLoading } = useCommit(); @@ -20,15 +16,10 @@ export default function TabDeploy() { const { isPullLoading, pull, pullError } = usePull(); const { isFetchStatusLoading, status } = useStatus(); const { currentBranch } = useBranches(); - const { metadata } = useMetadata(); - // ! git tagging: need to handle last deplyed here when tagging is implemented - const lastDeployedAt = - (artifact as GitApplicationArtifact)?.lastDeployedAt ?? null; const isPullFailing = !!pullError; const statusIsClean = status?.isClean ?? false; const statusBehindCount = status?.behindCount ?? 0; - const remoteUrl = metadata?.remoteUrl ?? null; return (