Skip to content

Removing unused imports and refactoring /public folder#388

Merged
abhitrueprogrammer merged 4 commits intoCodeChefVIT:stagingfrom
Abh1noob:staging
Oct 12, 2025
Merged

Removing unused imports and refactoring /public folder#388
abhitrueprogrammer merged 4 commits intoCodeChefVIT:stagingfrom
Abh1noob:staging

Conversation

@Abh1noob
Copy link
Member

@Abh1noob Abh1noob commented Oct 11, 2025

📌 Purpose

Reorganized assets in public folder and removed all unused files to clean the codebase


Corresponding issue: closes #387


🖼️ Showcase

Does not affect UI


🔧 Code Changes

Component Files Removed

  1. /src/components/NavDropdownButton.tsx - Unused dropdown button component
  2. /src/components/CookoffBanner.tsx - Unused cookoff banner component
  3. /src/components/screens/PapersPage.tsx - Unused papers page screen component
  4. /src/components/ui/banners/bannerEvent.tsx - Unused event banner component
  5. /src/components/ui/banners/bannerPermanent.tsx - Unused permanent banner component
  6. /src/components/AddPapers.tsx - Unused Add Paper component

Database & Utility Files Removed

  1. /src/db/user.ts - Unused user model
  2. /src/lib/utils/error.ts - Unused error handling utility

Public Assets Removed

  1. /public/fonts/yerk.woff2 - Unused font file (only yerk.woff is used)

Empty Directories Removed

  1. /public/favicons/ - Empty directory
  2. /public/images/ - Empty directory

Accomodating the changes:

1. Updated Font Paths in CSS

File: /src/styles/globals.css

Changed all font URLs from root to /fonts/ subdirectory:

  • /jostfont.ttf/fonts/jostfont.ttf
  • /Vipnagorgialla.otf/fonts/Vipnagorgialla.otf
  • /VipnagorgiallaBd.otf/fonts/VipnagorgiallaBd.otf
  • /play.ttf/fonts/play.ttf

2. Updated Asset Paths in Layout

File: /src/app/layout.tsx

Updated metadata paths:

  • favicon.svg/assets/favicon.svg
  • papers.png/assets/papers.png

Updated in:

  • metadata.icons
  • metadata.openGraph.images
  • metadata.twitter.images

3. Updated Paper Page Metadata

File: /src/app/paper/[id]/page.tsx

Updated metadata paths:

  • favicon.svg/assets/favicon.svg
  • papers.png/assets/papers.png

Updated in:

  • generateMetadata.icons
  • generateMetadata.openGraph.images
  • generateMetadata.twitter.images

4. Updated PWA Install Button

File: /src/components/ui/PWAInstallButton.tsx

Updated image paths:

  • /papers_logo.png/assets/papers_logo.png (2 occurrences)

5. Fixed Broken Imports

File: /src/components/Searchbar/pinned-searchbar.tsx

Removed unused imports:

  • Removed import NavDropdownButton from "../NavDropdownButton"
  • Removed import FloatingControls from "./floating-controls"
  • Removed import { X } from "lucide-react"
  • Consolidated interface imports

Code Quality Improvements

  • Clearer separation of assets by type
  • Removed unused code reducing technical debt

Breaking Changes

  • ⚠️ If any external services reference old paths, they need updating

@abhitrueprogrammer
Copy link
Collaborator

17602588123241295556731119558258

@abhitrueprogrammer abhitrueprogrammer merged commit 3540840 into CodeChefVIT:staging Oct 12, 2025
@abhitrueprogrammer abhitrueprogrammer deleted the staging branch October 12, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Removing unused file

2 participants