- 
                Notifications
    You must be signed in to change notification settings 
- Fork 80
feat: add custom 404 NotFound component and route (fixes #162) #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            sathwikhbhat
  wants to merge
  1
  commit into
  Code-A2Z:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
sathwikhbhat:issue-162-add-404-page
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +43
        
        
          −0
        
        
          
        
      
    
  
  
     Open
                    Changes from all commits
      Commits
    
    
  File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import React from 'react'; | ||
| import { Link } from 'react-router-dom'; | ||
| import ThemeToggle from '../components/ThemeToggle'; | ||
|  | ||
| export default function NotFound() { | ||
| return ( | ||
| <div className="min-h-screen bg-gray-50 dark:bg-gray-900 text-gray-800 dark:text-gray-200 font-montserrat"> | ||
| <header className="py-4 px-8 flex justify-between items-center bg-white dark:bg-gray-800 shadow-md"> | ||
| <Link to="/" className="text-2xl font-bold text-blue-600 dark:text-blue-400">Paisable</Link> | ||
| <div className="flex items-center gap-4"> | ||
| <ThemeToggle /> | ||
| </div> | ||
| </header> | ||
|  | ||
| <main className="flex items-center justify-center px-4 py-20"> | ||
| <div className="max-w-3xl w-full text-center"> | ||
| <div className="inline-flex items-center justify-center w-28 h-28 rounded-full bg-gradient-to-br from-pink-100 via-sky-100 to-purple-100 mx-auto mb-8"> | ||
| <svg className="w-16 h-16 text-pink-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
| <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M9.75 9.75l4.5 4.5M14.25 9.75l-4.5 4.5" /> | ||
| <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9-9 4.03-9 9 4.03 9 9 9z" /> | ||
| </svg> | ||
| </div> | ||
|  | ||
| <h1 className="text-4xl md:text-5xl font-extrabold mb-4">Page not found</h1> | ||
| <p className="text-lg md:text-xl text-gray-600 dark:text-gray-300 mb-8"> | ||
| Oops — the page you're looking for doesn't exist or has been moved. | ||
| </p> | ||
|  | ||
| <div className="flex flex-col sm:flex-row items-center justify-center gap-4"> | ||
| <Link to="/" className="inline-block bg-blue-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-blue-700"> | ||
| Go to Homepage | ||
| </Link> | ||
| <Link to="/contact" className="inline-block text-gray-700 dark:text-gray-200 px-4 py-2 rounded-lg hover:underline"> | ||
|         
                  sathwikhbhat marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| Contact Support | ||
| </Link> | ||
| </div> | ||
| </div> | ||
| </main> | ||
| </div> | ||
| ); | ||
| } | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.