Skip to content
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

Last #169

Open
wants to merge 888 commits into
base: main
Choose a base branch
from
Open

Last #169

wants to merge 888 commits into from

Conversation

EXELANCE-LLC
Copy link

No description provided.

challengingfuture added 30 commits August 2, 2024 13:03
- Updated the query key in the `has` array from 'category' to 'kategori'
- Added a new `Category` component to handle rendering of category/series pages
- Implemented logic to fetch and display series data and related posts
- Updated the `DynamicPage` component to render the appropriate page type based on the data fetched
- Added new GraphQL queries for fetching series data and related posts
- Improved SEO metadata for category/series pages
- Added `<meta name="robots" content="index, follow">` and `<meta name="googlebot" content="index, follow">` to the `<Head>` component for both post and category/series pages
- Updated the `<meta name="robots" content>` for category/series pages from `noindex` to `index, follow`
- Added logic to include category/series pages in the sitemap
- Updated the sitemap generation to include the category/series pages and their last modified dates
- Improved the overall structure and readability of the sitemap generation code
- Added `crypto` import to generate nonce for security headers
- Filtered out wildcard redirect rules and converted Hashnode redirects to Next.js format
- Added redirect rule for `/feed.xml` to `/rss.xml`
- Implemented security headers for Content Security Policy, X-Frame-Options, Referrer-Policy, and Cross-Origin-Embedder-Policy
- Enabled `reactMode: 'concurrent'` for better hydration error handling
- Optimized production builds by minimizing errors and enabling detailed error messages in development
- Enabled performance monitoring indicators and on-demand page caching
- Improved TypeScript error handling and page optimization
- Added state variables and toggle functions for cat and dog dropdown menus
- Implemented click-outside handling to close the dropdown menus when clicking outside
- Rendered the dropdown menus with category-specific content and images
- Integrated the dropdown menus into the mobile and desktop navbar
- Added a useEffect hook to close the cat and dog dropdown menus when the route changes
- This ensures the menus are closed when the user navigates to a different page, providing a better user experience
- Added state variables to store the current image and meta images for each menu item
- Implemented a function to fetch the meta image URL for each menu item and store it in state
- Added logic to display a random image from the cat and dog image arrays when the corresponding dropdown menu is opened
- Updated the `renderDropdownMenu` function to display the current image and update it on hover over the menu items
- Cleaned up event listener setup and teardown in the `useEffect` hook
- Added a new cat image to the `catImages` array
- Added new dog images to the `dogImages` array
- Added a new state variable to store preloaded images
- Implemented a function to preload the cat and dog images before they are needed
- Updated the `renderDropdownMenu` function to use the preloaded images instead of fetching them on demand
- This improves the initial load performance of the navbar by reducing the number of image requests
- Preload the meta images for each menu item before they are needed
- Update the image display logic to use the preloaded meta images or fallback to the default image
- Refine the hover behavior to only update the current image for the corresponding menu items
- Ensure the default image is always displayed when the user moves the mouse away from the menu items
- Update the image display logic to use the preloaded meta images or fallback to the default image
- Refine the hover behavior to only update the current image for the corresponding menu items
- Ensure the default image is always displayed when the user moves the mouse away from the menu items
- Added a `useCallback` hook to the `preloadImages` function to memoize it
- Implemented a more robust image preloading logic that handles image load errors
- Updated the `useEffect` hook to preload all images, including the meta images
- Added a new state variable `isImagesLoaded` to track when all images have been successfully preloaded
- Updated the `renderDropdownMenu` function to conditionally render the image component based on the `isImagesLoaded` state
- Refactored the `fetchMetaImages` function to use the `useCallback` hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants