diff --git a/package-lock.json b/package-lock.json index 88518d9..243bbec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@react-pdf/renderer": "^4.3.0", "@tailwindcss/vite": "^4.1.11", "framer": "^2.4.1", + "framer-motion": "^12.23.9", "lucide-react": "^0.525.0", "motion": "^12.23.9", "react": "^18.2.0", @@ -2619,22 +2620,24 @@ } }, "node_modules/framer-motion": { - "version": "10.18.0", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-10.18.0.tgz", - "integrity": "sha512-oGlDh1Q1XqYPksuTD/usb0I70hq95OUzmL9+6Zd+Hs4XV0oaISBa/UUMSjYiq6m8EUF32132mOJ8xVZS+I0S6w==", + "version": "12.23.9", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.9.tgz", + "integrity": "sha512-TqEHXj8LWfQSKqfdr5Y4mYltYLw96deu6/K9kGDd+ysqRJPNwF9nb5mZcrLmybHbU7gcJ+HQar41U3UTGanbbQ==", "license": "MIT", - "peer": true, "dependencies": { + "motion-dom": "^12.23.9", + "motion-utils": "^12.23.6", "tslib": "^2.4.0" }, - "optionalDependencies": { - "@emotion/is-prop-valid": "^0.8.2" - }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, "react": { "optional": true }, @@ -3353,33 +3356,6 @@ "integrity": "sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ==", "license": "MIT" }, - "node_modules/motion/node_modules/framer-motion": { - "version": "12.23.9", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.9.tgz", - "integrity": "sha512-TqEHXj8LWfQSKqfdr5Y4mYltYLw96deu6/K9kGDd+ysqRJPNwF9nb5mZcrLmybHbU7gcJ+HQar41U3UTGanbbQ==", - "license": "MIT", - "dependencies": { - "motion-dom": "^12.23.9", - "motion-utils": "^12.23.6", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "@emotion/is-prop-valid": "*", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/is-prop-valid": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", diff --git a/package.json b/package.json index 61f28e8..090503e 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@react-pdf/renderer": "^4.3.0", "@tailwindcss/vite": "^4.1.11", "framer": "^2.4.1", + "framer-motion": "^12.23.9", "lucide-react": "^0.525.0", "motion": "^12.23.9", "react": "^18.2.0", diff --git a/src/components/GoalsPage.jsx b/src/components/GoalsPage.jsx index a6a9adb..efdd7b8 100644 --- a/src/components/GoalsPage.jsx +++ b/src/components/GoalsPage.jsx @@ -3,9 +3,11 @@ import { useTransactions } from "./TransactionContext"; import AddGoalModal from './AddGoalModal'; import Footer from './Footer'; import GoalCard from './GoalCard'; -import { Plus } from 'lucide-react'; +import { Plus, ArrowLeft } from 'lucide-react'; import ConfirmationModal from './ConfirmationModal'; import ContributeToGoalModal from './ContributeToGoalModal'; +import { useNavigate } from 'react-router-dom'; + export default function GoalsPage() { const { goals, setGoals } = useTransactions(); @@ -15,6 +17,8 @@ export default function GoalsPage() { const [goalToDelete, setGoalToDelete] = useState(null); const [showContributeModal, setShowContributeModal] = useState(false); const [selectedGoalId, setSelectedGoalId] = useState(null); + const navigate = useNavigate(); + // 2. Add state for animation visibility const [isVisible, setIsVisible] = useState(false); @@ -50,9 +54,23 @@ export default function GoalsPage() {
-

- Financial Goals -

+
+ + +

+ Financial Goals +

+
+ +

Set, track, and achieve your savings goals.