Write on the margins of the internet. Powered by the AT Protocol. margin.at
extension web atproto comments

fix home redirects

+11 -10
+2 -2
web/src/components/MobileNav.jsx
··· 14 14 return ( 15 15 <nav className="mobile-bottom-nav"> 16 16 <Link 17 - to="/" 18 - className={`mobile-bottom-nav-item ${isActive("/") ? "active" : ""}`} 17 + to="/home" 18 + className={`mobile-bottom-nav-item ${isActive("/home") ? "active" : ""}`} 19 19 > 20 20 <Home size={22} /> 21 21 <span>Home</span>
+6 -5
web/src/pages/AnnotationDetail.jsx
··· 1 1 import { useState, useEffect } from "react"; 2 - import { useParams, Link, useLocation } from "react-router-dom"; 2 + import { useParams, Link, useLocation, useNavigate } from "react-router-dom"; 3 3 import AnnotationCard, { HighlightCard } from "../components/AnnotationCard"; 4 4 import BookmarkCard from "../components/BookmarkCard"; 5 5 import ReplyList from "../components/ReplyList"; ··· 17 17 export default function AnnotationDetail() { 18 18 const { uri, did, rkey, handle, type } = useParams(); 19 19 const location = useLocation(); 20 + const navigate = useNavigate(); 20 21 const { isAuthenticated, user } = useAuth(); 21 22 const [annotation, setAnnotation] = useState(null); 22 23 const [replies, setReplies] = useState([]); ··· 157 158 {error || "This annotation may have been deleted."} 158 159 </p> 159 160 <Link 160 - to="/" 161 + to="/home" 161 162 className="btn btn-primary" 162 163 style={{ marginTop: "16px" }} 163 164 > ··· 171 172 return ( 172 173 <div className="annotation-detail-page"> 173 174 <div className="annotation-detail-header"> 174 - <Link to="/" className="back-link"> 175 + <Link to="/home" className="back-link"> 175 176 ← Back to Feed 176 177 </Link> 177 178 </div> ··· 179 180 {annotation.type === "Highlight" ? ( 180 181 <HighlightCard 181 182 highlight={annotation} 182 - onDelete={() => (window.location.href = "/")} 183 + onDelete={() => navigate("/home")} 183 184 /> 184 185 ) : annotation.type === "Bookmark" ? ( 185 186 <BookmarkCard 186 187 bookmark={annotation} 187 - onDelete={() => (window.location.href = "/")} 188 + onDelete={() => navigate("/home")} 188 189 /> 189 190 ) : ( 190 191 <AnnotationCard annotation={annotation} />
+1 -1
web/src/pages/New.jsx
··· 59 59 } 60 60 61 61 const handleSuccess = () => { 62 - navigate("/"); 62 + navigate("/home"); 63 63 }; 64 64 65 65 return (
+1 -1
web/src/pages/Privacy.jsx
··· 4 4 export default function Privacy() { 5 5 return ( 6 6 <div className="feed-page"> 7 - <Link to="/" className="back-link"> 7 + <Link to="/home" className="back-link"> 8 8 <ArrowLeft size={18} /> 9 9 <span>Home</span> 10 10 </Link>
+1 -1
web/src/pages/Terms.jsx
··· 4 4 export default function Terms() { 5 5 return ( 6 6 <div className="feed-page"> 7 - <Link to="/" className="back-link"> 7 + <Link to="/home" className="back-link"> 8 8 <ArrowLeft size={18} /> 9 9 <span>Home</span> 10 10 </Link>