<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Zobaer Ahmed Zihad</title>
    <description>The latest articles on DEV Community by Zobaer Ahmed Zihad (@zobaer-ahmed-zihad).</description>
    <link>https://dev.to/zobaer-ahmed-zihad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F840872%2Fcbddec17-cc6b-4373-aaa7-77c0025de34c.jpg</url>
      <title>DEV Community: Zobaer Ahmed Zihad</title>
      <link>https://dev.to/zobaer-ahmed-zihad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zobaer-ahmed-zihad"/>
    <language>en</language>
    <item>
      <title>How to hide navbar and footer when 404 (Page not found) is showing ?</title>
      <dc:creator>Zobaer Ahmed Zihad</dc:creator>
      <pubDate>Wed, 20 Jul 2022 09:18:56 +0000</pubDate>
      <link>https://dev.to/zobaer-ahmed-zihad/how-to-hide-navbar-and-footer-when-404-page-not-found-is-showing--17b6</link>
      <guid>https://dev.to/zobaer-ahmed-zihad/how-to-hide-navbar-and-footer-when-404-page-not-found-is-showing--17b6</guid>
      <description>&lt;p&gt;I have a react application. I want to hide navbar and footer when the page 404 (Page Not Found) is showing. But I can't do this. &lt;/p&gt;

&lt;p&gt;I can hide footer for other pages based on pathnames. Like &lt;/p&gt;

&lt;p&gt;import { useLocation } from "react-router-dom";&lt;/p&gt;

&lt;p&gt;const location = useLocation();&lt;br&gt;
  if (location?.pathname === "/login" || "/sign-up") {&lt;br&gt;
    return null;&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;But this hiding method I can't use on 404 page Because there is no specific pathname. How can I hide ? Please give me some suggestions.  &lt;/p&gt;

</description>
      <category>react</category>
      <category>pagenotfound</category>
      <category>reactrouter</category>
    </item>
  </channel>
</rss>
