atproto explorer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add error handling

+9 -5
+9 -5
src/main.tsx
··· 104 104 }; 105 105 106 106 const Layout: Component<RouteSectionProps<unknown>> = (props) => { 107 - navigator.registerProtocolHandler("web+at", "/%s"); 108 - const pathname = decodeURIComponent(useLocation().pathname); 109 - if (pathname.startsWith("/web+at://")) { 110 - const navigate = useNavigate(); 111 - navigate(pathname.replace("web+at://", "at/")); 107 + try { 108 + navigator.registerProtocolHandler("web+at", "/%s"); 109 + const pathname = decodeURIComponent(useLocation().pathname); 110 + if (pathname.startsWith("/web+at://")) { 111 + const navigate = useNavigate(); 112 + navigate(pathname.replace("web+at://", "at/")); 113 + } 114 + } catch (err) { 115 + console.log(err); 112 116 } 113 117 const params = useParams(); 114 118 setNotice("");