├── .env.example ├── .eslintrc.json ├── public ├── ads.txt ├── mp3.mp3 ├── swipe.png ├── download.png ├── github.png ├── metaicon.png ├── ubericon.png ├── FrontPage.png ├── appleicon.png ├── googleicon.png ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon-blac.jpg ├── icon-192x192.png ├── icon-256x256.png ├── icon-384x384.png ├── icon-512x512.png ├── jntuhresults.png ├── microsofticon.png ├── youtubeicon.png ├── jntuhresults_md.png ├── apple-touch-icon.png ├── jntuhresults_black.png ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── jntuhresults_md_black.png ├── sw.js ├── site.webmanifest ├── vercel.svg ├── next.svg └── manifest.json ├── app ├── favicon.ico ├── not-found.tsx ├── faq │ └── layout.tsx ├── syllabus │ └── layout.tsx ├── helpcenter │ ├── layout.tsx │ └── page.tsx ├── calendars │ └── layout.tsx ├── notifications │ ├── layout.tsx │ ├── examcode │ │ ├── layout.tsx │ │ └── page.tsx │ ├── examresults │ │ └── page.tsx │ └── page.tsx ├── classresult │ ├── layout.tsx │ ├── result │ │ └── page.tsx │ └── page.tsx ├── creditchecker │ ├── layout.tsx │ ├── result │ │ └── page.tsx │ └── page.tsx ├── carrers │ └── layout.tsx ├── academicresult │ ├── layout.tsx │ ├── page.tsx │ └── result │ │ └── page.tsx ├── academicallresult │ ├── layout.tsx │ ├── result │ │ └── page.tsx │ └── page.tsx ├── backlogreport │ ├── layout.tsx │ ├── page.tsx │ └── result │ │ └── page.tsx ├── (root) │ └── layout.tsx ├── resultcontrast │ ├── layout.tsx │ └── page.tsx ├── api │ ├── redisdata │ │ └── route.ts │ └── singleresult │ │ └── route.ts ├── layout.tsx ├── excelresult │ └── page.tsx ├── globals.css └── privacy │ └── page.tsx ├── postcss.config.js ├── next.config.js ├── global.d.ts ├── .env ├── components ├── customfunctions │ ├── timer.tsx │ ├── divideArrayIntosubArrays.tsx │ ├── calculatetotalbacklog.tsx │ ├── localStorage.tsx │ ├── performanceanalysis.tsx │ └── calculateresult.tsx ├── ui │ ├── skeleton.tsx │ ├── label.tsx │ ├── input.tsx │ ├── toaster.tsx │ ├── radio-group.tsx │ ├── toggle.tsx │ ├── button.tsx │ ├── tabs.tsx │ ├── card.tsx │ ├── pagination.tsx │ ├── drawer.tsx │ ├── dialog.tsx │ ├── use-toast.ts │ ├── form.tsx │ └── alert-dialog.tsx ├── pushnotifications │ └── notificationPermission.tsx ├── themeprovider │ └── theme-provider.tsx ├── api │ ├── fetchNotifications.tsx │ └── fetchClassResult.tsx ├── download │ ├── print.tsx │ └── pwa.tsx ├── analytics │ └── GoogleAnalytics.tsx ├── result │ ├── totalResult.tsx │ ├── subjectRenderer.tsx │ ├── details.tsx │ ├── academicallresult.tsx │ ├── academicresult.tsx │ ├── results.tsx │ └── creditscheckerresult.tsx ├── ads │ └── adcomponent.tsx ├── homepage │ └── title.tsx ├── googledocviewer │ └── GoogleDocViewer.tsx ├── loading │ └── loading.tsx ├── notifications │ ├── searchBar.tsx │ └── notificationForm.tsx ├── skeleton │ ├── ResultDetailsSkeleton.tsx │ └── AcademicResultsSkeleton.tsx ├── navbar │ ├── quicknavigation.tsx │ └── navbar.tsx ├── footer │ └── footer.tsx ├── forms │ └── resulthtnoform.tsx └── metadata │ └── metadata.tsx ├── lib └── utils.ts ├── constants ├── resultconstants.tsx ├── examyear.tsx ├── regulationdetails.tsx ├── degree.tsx ├── romantoNumeral.tsx ├── homecontent.tsx ├── branchdetails.tsx ├── homeLinks.tsx ├── creditregulations.tsx ├── socialmediaitems.tsx ├── academiccalendars.tsx └── rollNumberendings.tsx ├── components.json ├── .gitignore ├── tailwind.config.ts ├── tsconfig.json ├── customhooks ├── navbarhook.tsx ├── sidebarhook.tsx └── setupPush.ts ├── package.json ├── tailwind.config.js ├── types └── index.ts └── README.md /.env.example: -------------------------------------------------------------------------------- 1 | REDIS_URL= 2 | NEXT_PUBLIC_GOOGLE_ANALYTICS= 3 | 4 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /public/ads.txt: -------------------------------------------------------------------------------- 1 | google.com, pub-5512897194230969, DIRECT, f08c47fec0942fa0 2 | -------------------------------------------------------------------------------- /public/mp3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/mp3.mp3 -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /public/swipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/swipe.png -------------------------------------------------------------------------------- /public/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/download.png -------------------------------------------------------------------------------- /public/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/github.png -------------------------------------------------------------------------------- /public/metaicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/metaicon.png -------------------------------------------------------------------------------- /public/ubericon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/ubericon.png -------------------------------------------------------------------------------- /public/FrontPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/FrontPage.png -------------------------------------------------------------------------------- /public/appleicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/appleicon.png -------------------------------------------------------------------------------- /public/googleicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/googleicon.png -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/favicon-32x32.png -------------------------------------------------------------------------------- /public/favicon-blac.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/favicon-blac.jpg -------------------------------------------------------------------------------- /public/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/icon-192x192.png -------------------------------------------------------------------------------- /public/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/icon-256x256.png -------------------------------------------------------------------------------- /public/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/icon-384x384.png -------------------------------------------------------------------------------- /public/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/icon-512x512.png -------------------------------------------------------------------------------- /public/jntuhresults.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/jntuhresults.png -------------------------------------------------------------------------------- /public/microsofticon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/microsofticon.png -------------------------------------------------------------------------------- /public/youtubeicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/youtubeicon.png -------------------------------------------------------------------------------- /public/jntuhresults_md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/jntuhresults_md.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/apple-touch-icon.png -------------------------------------------------------------------------------- /public/jntuhresults_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/jntuhresults_black.png -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | module.exports = nextConfig; 5 | -------------------------------------------------------------------------------- /public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/jntuhresults_md_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThilakReddyy/JNTUHRESULTS-WEB/HEAD/public/jntuhresults_md_black.png -------------------------------------------------------------------------------- /global.d.ts: -------------------------------------------------------------------------------- 1 | // global.d.ts 2 | export {}; 3 | 4 | declare global { 5 | interface Window { 6 | adsbygoogle: any[]; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | REDIS_URL="redis://default:DPbL6imfaFG2mIb21DaB4haFpeHOjpkj@viaduct.proxy.rlwy.net:59386" 2 | NEXT_PUBLIC_GOOGLE_ANALYTICS="G-6CR1W425NE" 3 | -------------------------------------------------------------------------------- /components/customfunctions/timer.tsx: -------------------------------------------------------------------------------- 1 | export function sleep(seconds: number) { 2 | return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); 3 | } 4 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /components/customfunctions/divideArrayIntosubArrays.tsx: -------------------------------------------------------------------------------- 1 | function DivideArrayIntoSubArray(arr: Array) { 2 | return Array.from({ length: Math.ceil(arr.length / 2) }, (_, i) => 3 | arr.slice(i * 2, i * 2 + 2), 4 | ); 5 | } 6 | 7 | export { DivideArrayIntoSubArray }; 8 | -------------------------------------------------------------------------------- /constants/resultconstants.tsx: -------------------------------------------------------------------------------- 1 | export const grades = ["O", "A+", "A", "B+", "B", "C", "F", "P", "Ab", "-"]; 2 | 3 | export const credits: number[] = [ 4 | 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 5 | 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5, 6 | ]; 7 | -------------------------------------------------------------------------------- /app/not-found.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { redirect, usePathname } from "next/navigation"; 3 | 4 | const NotFound = () => { 5 | const pagename = usePathname(); 6 | if (pagename === "/academicreport") redirect("/academicresult"); 7 | else redirect("/"); 8 | }; 9 | 10 | export default NotFound; 11 | -------------------------------------------------------------------------------- /constants/examyear.tsx: -------------------------------------------------------------------------------- 1 | interface examYearDetailsProps { 2 | [key: string]: string; 3 | } 4 | 5 | export const examYearDetails: examYearDetailsProps = { 6 | "2025": "2025", 7 | "2024": "2024", 8 | "2023": "2023", 9 | "2022": "2022", 10 | "2021": "2021", 11 | "2020": "2020", 12 | "2019": "2019", 13 | "2018": "2018", 14 | }; 15 | -------------------------------------------------------------------------------- /app/faq/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | FAQ", 5 | description: "Frequently Asked questions", 6 | }; 7 | 8 | export default function RootLayout({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | return <>{children}; 14 | } 15 | -------------------------------------------------------------------------------- /components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /public/sw.js: -------------------------------------------------------------------------------- 1 | self.addEventListener("push", function (event) { 2 | const data = event.data.json(); 3 | event.waitUntil( 4 | self.registration.showNotification(data.title, { 5 | body: data.body, 6 | icon: "/android-chrome-512x512.png", 7 | url: "https://jntuhresults.vercel.app/academicresult", 8 | }), 9 | ); 10 | }); 11 | -------------------------------------------------------------------------------- /app/syllabus/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | SYLLABUS", 5 | description: "Get Syllabus with in a go.", 6 | }; 7 | 8 | export default function RootLayout({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | return <>{children}; 14 | } 15 | -------------------------------------------------------------------------------- /app/helpcenter/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | HelpCenter", 5 | description: "Check out academic result with in a go.", 6 | }; 7 | 8 | export default function RootLayout({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | return <>{children}; 14 | } 15 | -------------------------------------------------------------------------------- /app/calendars/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | CALENDARS", 5 | description: "All Academic Calendars for the current year.", 6 | }; 7 | 8 | export default function RootLayout({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | return <>{children}; 14 | } 15 | -------------------------------------------------------------------------------- /app/notifications/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | NOTIFICATIONS", 5 | description: "Check out notifications with in a go.", 6 | }; 7 | 8 | export default function RootLayout({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | return <>{children}; 14 | } 15 | -------------------------------------------------------------------------------- /constants/regulationdetails.tsx: -------------------------------------------------------------------------------- 1 | interface regulationDetailsProps { 2 | [key: string]: string; 3 | } 4 | 5 | export const regulationDetails: regulationDetailsProps = { 6 | "18": "2018-2022", 7 | "19": "2019-2023", 8 | "20": "2020-2024", 9 | "21": "2021-2025", 10 | "22": "2022-2026", 11 | "23": "2023-2027", 12 | "24": "2024-2028", 13 | "25": "2025-2029", 14 | }; 15 | -------------------------------------------------------------------------------- /components/customfunctions/calculatetotalbacklog.tsx: -------------------------------------------------------------------------------- 1 | export function calculatetotalbacklog(result: any) { 2 | // Define a type for the gradeMapper object 3 | var backlogs = 0; 4 | Object.keys(result).forEach((semester) => { 5 | if (typeof result[semester] === "object") { 6 | backlogs += result[semester]["backlog"]; 7 | } 8 | }); 9 | 10 | return backlogs; 11 | } 12 | -------------------------------------------------------------------------------- /app/classresult/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | CLASS RESULT", 5 | description: "compare Academic Performance Across Semesters with Classmate.", 6 | }; 7 | 8 | export default function RootLayout({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | return <>{children}; 14 | } 15 | -------------------------------------------------------------------------------- /components/customfunctions/localStorage.tsx: -------------------------------------------------------------------------------- 1 | export const saveToLocalStorage = async (key: string, value: string) => { 2 | localStorage.clear(); 3 | localStorage.setItem(key, value); 4 | }; 5 | 6 | export const getFromLocalStorage = (key: string) => { 7 | const data = localStorage.getItem(key); 8 | if (data != null) { 9 | return JSON.parse(data); 10 | } 11 | return null; 12 | }; 13 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } -------------------------------------------------------------------------------- /app/creditchecker/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | CREDIT CHECKER", 5 | description: 6 | "check your credits and find the credits required to promote to next year.", 7 | }; 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode; 13 | }) { 14 | return <>{children}; 15 | } 16 | -------------------------------------------------------------------------------- /app/carrers/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | JOBS & CARRERS", 5 | description: 6 | "Discover career opportunities!! Find internships, jobs and kick start your journey!!!", 7 | }; 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode; 13 | }) { 14 | return <>{children}; 15 | } 16 | -------------------------------------------------------------------------------- /constants/degree.tsx: -------------------------------------------------------------------------------- 1 | interface DegreeDetailsProps { 2 | [key: string]: string; 3 | } 4 | 5 | export const degreeDetails: DegreeDetailsProps = { 6 | A: "B.Tech", 7 | R: "B.Pharmacy", 8 | }; 9 | 10 | export const degrees: { [key: string]: string } = { 11 | "B.Tech": "btech", 12 | "B.Pharmacy": "bpharmacy", 13 | "M.Tech": "mtech", 14 | "M.Pharmacy": "mpharmacy", 15 | "M.B.A": "mba", 16 | "M.C.A": "mca", 17 | }; 18 | -------------------------------------------------------------------------------- /app/academicresult/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | ACADEMIC RESULT", 5 | description: 6 | "Find your JNTUH academic results quickly and effortlessly. Easy access, comprehensive information, all in one place", 7 | }; 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode; 13 | }) { 14 | return <>{children}; 15 | } 16 | -------------------------------------------------------------------------------- /app/academicallresult/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | ACADEMIC ALL RESULT", 5 | description: 6 | "Find your JNTUH all your academic results quickly and effortlessly. Easy access, comprehensive information, all in one place", 7 | }; 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode; 13 | }) { 14 | return <>{children}; 15 | } 16 | -------------------------------------------------------------------------------- /public/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JNTUH VERCEL", 3 | "short_name": "JNTUH VERCEL", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /app/notifications/examcode/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | description: "JNTUH B.Tech, B.Pharamacy,M.Tech,B.Tech,M.B.A Results", 5 | keywords: 6 | "jntuh 1-1 results, jntuh 1-2 results, jntuh 2-1 results, jntuh 2-2 results, jntuh 3-1 results, jntuh 4-1 results, jntuh 4-2 results", 7 | }; 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode; 13 | }) { 14 | return <>{children}; 15 | } 16 | -------------------------------------------------------------------------------- /app/backlogreport/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | BACKLOG ASSESMENT", 5 | description: 6 | "Get a clear picture of your JNTUH academic standing with our easy-to-use backlog assessment tool. See your current backlog status and plan your next steps efficiently.", 7 | }; 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode; 13 | }) { 14 | return <>{children}; 15 | } 16 | -------------------------------------------------------------------------------- /components/pushnotifications/notificationPermission.tsx: -------------------------------------------------------------------------------- 1 | export async function askNotificationPermission(): Promise { 2 | if (typeof window === "undefined" || !("Notification" in window)) { 3 | console.warn( 4 | "Notification API not available on server or unsupported browser.", 5 | ); 6 | return false; 7 | } 8 | 9 | const permission = await Notification.requestPermission(); 10 | 11 | if (permission !== "granted") { 12 | return false; 13 | } 14 | 15 | return true; 16 | } 17 | -------------------------------------------------------------------------------- /app/(root)/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS", 5 | description: 6 | "Get your JNTUH exam results (UG & PG) online easily! Get your grades, CGPA, and check for backlogs on the official JNTUH Vercel portal. Find jobs & internships too! Start now!", 7 | }; 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode; 13 | }) { 14 | return
{children}
; 15 | } 16 | -------------------------------------------------------------------------------- /app/resultcontrast/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: "JNTUH RESULTS | ACADEMIC CONTRAST", 5 | description: 6 | "Effortlessly track your academic progress at JNTUH by comparing your performance across semesters and against classmates. Gain valuable insights to improve your learning strategies.", 7 | }; 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode; 13 | }) { 14 | return <>{children}; 15 | } 16 | -------------------------------------------------------------------------------- /components/themeprovider/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 5 | import { type ThemeProviderProps } from "next-themes/dist/types"; 6 | 7 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 8 | const [mounted, setMounted] = React.useState(false); 9 | React.useEffect(() => setMounted(true), []); 10 | return ( 11 | mounted && {children} 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | .env 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /constants/romantoNumeral.tsx: -------------------------------------------------------------------------------- 1 | export const romanToNumeral: { [key: string]: string } = { 2 | " I Year I ": " 1-1 ", 3 | " I Year II ": " 1-2 ", 4 | " II Year I ": " 2-1 ", 5 | " II Year II ": " 2-2 ", 6 | " III Year I ": " 3-1 ", 7 | " III Year II ": " 3-2 ", 8 | " IV Year I ": " 4-1 ", 9 | " IV Year II ": " 4-2 ", 10 | " I ": " 1st ", 11 | " II ": " 2nd", 12 | " III ": " 3rd ", 13 | " IV ": " 4th ", 14 | " V ": " 5th ", 15 | " VI ": " 6th ", 16 | " VII ": " 7th ", 17 | " VIII ": " 8th ", 18 | " IX ": " 9th ", 19 | " X ": " 10th ", 20 | }; 21 | -------------------------------------------------------------------------------- /tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | content: [ 5 | "./pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | backgroundImage: { 12 | "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", 13 | "gradient-conic": 14 | "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", 15 | }, 16 | }, 17 | }, 18 | plugins: [], 19 | }; 20 | export default config; 21 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/api/fetchNotifications.tsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | export async function fetchNotifications() { 4 | try { 5 | const response = await axios.get("/api/redisdata", { 6 | params: { 7 | htno: "notifications", 8 | }, 9 | }); 10 | 11 | if (response.status === 200) { 12 | return response.data; 13 | } else { 14 | console.error( 15 | `Failed to fetch notifications. Status: ${response.status}`, 16 | ); 17 | return null; 18 | } 19 | } catch (error) { 20 | console.error("An error occurred while fetching notifications:", error); 21 | return null; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /components/download/print.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useReactToPrint } from "react-to-print"; 3 | 4 | import { Download } from "lucide-react"; 5 | 6 | const Print = ({ componentRef }: { componentRef: any }) => { 7 | const handlePrint = useReactToPrint({ 8 | content: () => componentRef.current, 9 | }); 10 | 11 | return ( 12 | <> 13 |
16 | { 18 | handlePrint(); 19 | }} 20 | size={15} 21 | /> 22 |
23 | 24 | ); 25 | }; 26 | 27 | export default Print; 28 | -------------------------------------------------------------------------------- /components/analytics/GoogleAnalytics.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import Script from "next/script"; 3 | 4 | export default function GoogleAnalytics() { 5 | return ( 6 | <> 7 | 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /components/result/totalResult.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const TotalResult = ({ CGPA, backlogs }: { CGPA: any; backlogs: any }) => { 4 | return ( 5 | 6 | 7 | 8 | 11 | 12 | 15 | 18 | 19 | 20 |
9 | Backlogs 10 | {backlogs} 13 | CGPA 14 | 16 | {backlogs > 0 ? "" : CGPA} 17 |
21 | ); 22 | }; 23 | 24 | export default TotalResult; 25 | -------------------------------------------------------------------------------- /components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | import { cva, type VariantProps } from "class-variance-authority" 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const labelVariants = cva( 10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 11 | ) 12 | 13 | const Label = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | VariantProps 17 | >(({ className, ...props }, ref) => ( 18 | 23 | )) 24 | Label.displayName = LabelPrimitive.Root.displayName 25 | 26 | export { Label } 27 | -------------------------------------------------------------------------------- /components/ads/adcomponent.tsx: -------------------------------------------------------------------------------- 1 | // components/AdComponent.tsx 2 | "use client"; 3 | import { useEffect } from "react"; 4 | 5 | const AdComponent = () => { 6 | useEffect(() => { 7 | try { 8 | (window.adsbygoogle = window.adsbygoogle || []).push({}); 9 | } catch (e) { 10 | console.error("Adsbygoogle error:", e); 11 | } 12 | }, []); 13 | 14 | return ( 15 |
16 | 21 | 29 |
30 | ); 31 | }; 32 | 33 | export default AdComponent; 34 | -------------------------------------------------------------------------------- /constants/homecontent.tsx: -------------------------------------------------------------------------------- 1 | export const HomeContent = [ 2 | { 3 | title: "Academic Results", 4 | Description: 5 | "Access your overall academic performance with just an hall ticket", 6 | link: "/academicresult", 7 | }, 8 | { 9 | title: "Result Contrast", 10 | Description: 11 | "Compare your academic performance across all semesters with your classmate", 12 | link: "/resultcontrast", 13 | }, 14 | { 15 | title: "Class Results", 16 | Description: 17 | "View the results of your classmates and compare your performance with theirs", 18 | link: "/classresult", 19 | }, 20 | { 21 | title: "Backlog Report", 22 | Description: "Access your overall backlogs report with an hallticket", 23 | link: "/backlogreport", 24 | }, 25 | 26 | { 27 | title: "Notifications", 28 | Description: "Get all the latest Notifications from JNTUH", 29 | link: "/notifications", 30 | }, 31 | ]; 32 | -------------------------------------------------------------------------------- /components/ui/input.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | export interface InputProps 6 | extends React.InputHTMLAttributes {} 7 | 8 | const Input = React.forwardRef( 9 | ({ className, type, ...props }, ref) => { 10 | return ( 11 | 20 | ); 21 | }, 22 | ); 23 | Input.displayName = "Input"; 24 | 25 | export { Input }; 26 | -------------------------------------------------------------------------------- /components/ui/toaster.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { 4 | Toast, 5 | ToastClose, 6 | ToastDescription, 7 | ToastProvider, 8 | ToastTitle, 9 | ToastViewport, 10 | } from "@/components/ui/toast" 11 | import { useToast } from "@/components/ui/use-toast" 12 | 13 | export function Toaster() { 14 | const { toasts } = useToast() 15 | 16 | return ( 17 | 18 | {toasts.map(function ({ id, title, description, action, ...props }) { 19 | return ( 20 | 21 |
22 | {title && {title}} 23 | {description && ( 24 | {description} 25 | )} 26 |
27 | {action} 28 | 29 |
30 | ) 31 | })} 32 | 33 |
34 | ) 35 | } 36 | -------------------------------------------------------------------------------- /app/api/redisdata/route.ts: -------------------------------------------------------------------------------- 1 | import { NextRequest, NextResponse } from "next/server"; 2 | import Redis from "ioredis"; 3 | 4 | let url: string = String(process.env.REDIS_URL); 5 | let redis = new Redis(url); 6 | 7 | export async function GET(req: NextRequest) { 8 | try { 9 | const rollNumber: string = String( 10 | req.nextUrl.searchParams.get("htno")?.toUpperCase(), 11 | ); 12 | console.log(rollNumber); 13 | let cache: string | null = ""; 14 | if (rollNumber === "NOTIFICATIONS") { 15 | cache = await redis.get("notifications"); 16 | } else { 17 | cache = await redis.get(rollNumber); 18 | } 19 | if (cache) { 20 | const cacheData = JSON.parse(cache); 21 | 22 | return NextResponse.json(cacheData["data"], { status: 200 }); 23 | } 24 | return NextResponse.json("Redis data not found", { status: 404 }); 25 | } catch (error) { 26 | return NextResponse.json("Internal Server Error", { status: 500 }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /customhooks/navbarhook.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { createContext, useState, ReactNode, useContext } from "react"; 3 | 4 | interface NavbarContextprops { 5 | navbar: boolean; 6 | togglenavbar: () => void; 7 | } 8 | 9 | const NavbarContext = createContext(undefined); 10 | 11 | export const NavBarProvider = ({ children }: { children: ReactNode }) => { 12 | const [navbar, setNavBar] = useState(true); 13 | 14 | const togglenavbar = () => { 15 | setNavBar((navbar) => !navbar); 16 | }; 17 | const value: NavbarContextprops = { 18 | navbar, 19 | togglenavbar, 20 | }; 21 | return ( 22 | {children} 23 | ); 24 | }; 25 | export const useNavBarContext = () => { 26 | const sidebar = useContext(NavbarContext); 27 | 28 | if (sidebar == undefined) { 29 | throw new Error("useSidecontext must be used with SidebarContext"); 30 | } 31 | 32 | return sidebar; 33 | }; 34 | -------------------------------------------------------------------------------- /customhooks/sidebarhook.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { createContext, useState, ReactNode, useContext } from "react"; 3 | 4 | interface SidebarContextprops { 5 | sidebar: boolean; 6 | toggleSidebar: () => void; 7 | } 8 | 9 | const SidebarContext = createContext( 10 | undefined, 11 | ); 12 | 13 | export const SidebarProvider = ({ children }: { children: ReactNode }) => { 14 | const [sidebar, setSidebar] = useState(false); 15 | 16 | const toggleSidebar = () => { 17 | setSidebar((prevsidebar) => !prevsidebar); 18 | }; 19 | const value: SidebarContextprops = { 20 | sidebar, 21 | toggleSidebar, 22 | }; 23 | return ( 24 | {children} 25 | ); 26 | }; 27 | export const useSidebarContext = () => { 28 | const sidebar = useContext(SidebarContext); 29 | 30 | if (sidebar == undefined) { 31 | throw new Error("useSidecontext must be used with SidebarContext"); 32 | } 33 | 34 | return sidebar; 35 | }; 36 | -------------------------------------------------------------------------------- /components/homepage/title.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useEffect, useState } from "react"; 4 | 5 | const Title = () => { 6 | const title = "JNTUH RESULTS!!"; 7 | const sleep = (ms: any) => new Promise((resolve) => setTimeout(resolve, ms)); 8 | const [blind, setblind] = useState(false); 9 | useEffect(() => { 10 | // Wait for 2 seconds before starting the typewriter effect 11 | const typeWriter = async () => { 12 | await sleep(200); 13 | 14 | for (let i = 0; i < title.length; i++) { 15 | setTitleIndex(i); 16 | await sleep(50); 17 | } 18 | while (true) { 19 | for (let i = 0; i < 5; i++) { 20 | setblind(true); 21 | await sleep(400); 22 | setblind(false); 23 | await sleep(400); 24 | } 25 | } 26 | }; 27 | }, []); 28 | const [titleIndex, setTitleIndex] = useState(0); 29 | return ( 30 |
31 |

{title}

32 | | 33 |
34 | ); 35 | }; 36 | 37 | export default Title; 38 | -------------------------------------------------------------------------------- /components/googledocviewer/GoogleDocViewer.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import Loading from "../loading/loading"; 3 | 4 | interface GoogleDocViewerProps { 5 | url: string; 6 | splNote: string; 7 | width?: string; 8 | height?: string; 9 | } 10 | 11 | const GoogleDocViewer: React.FC = ({ 12 | url, 13 | splNote, 14 | width = "100%", 15 | height = "580px", 16 | }) => { 17 | const src = `https://docs.google.com/viewer?url=${encodeURIComponent(url)}&embedded=true`; 18 | const [isLoading, setIsLoading] = useState(true); 19 | useEffect(() => { 20 | const iframe = document.getElementById("doc-iframe") as HTMLIFrameElement; 21 | if (iframe) { 22 | iframe.onload = () => { 23 | setIsLoading(false); 24 | }; 25 | } 26 | }, []); 27 | return ( 28 | <> 29 | {isLoading && } 30 | 36 | 37 | ); 38 | }; 39 | 40 | export default GoogleDocViewer; 41 | -------------------------------------------------------------------------------- /components/loading/loading.tsx: -------------------------------------------------------------------------------- 1 | import { useTheme } from "next-themes"; 2 | import { HashLoader } from "react-spinners"; 3 | const Loading = ({ splNote = "Result" }) => { 4 | const { theme } = useTheme(); 5 | const color = theme == "light" ? "#000000" : "#ffffff"; 6 | return ( 7 | <> 8 |
9 |
10 | 11 | Please wait a moment while we retrieve the results for you... 12 | 13 | 14 | Kindly wait!! {splNote} is loading... 15 | 16 |
17 |
18 |
19 | 20 | 27 | 28 |
29 | 30 | ); 31 | }; 32 | 33 | export default Loading; 34 | -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /constants/branchdetails.tsx: -------------------------------------------------------------------------------- 1 | interface BranchDetailsProps { 2 | value: string; 3 | label: string; 4 | } 5 | 6 | export const branchDetails: Record = { 7 | "00": "B Pharmacy", 8 | "01": "Civil Engineering", 9 | "02": "Electrical & Electronics Engineering", 10 | "03": "Mechanical Engineering", 11 | "04": "Electronics & Communication Engineering", 12 | "05": "Computer Science & Engineering", 13 | "08": "Chemical Engineering", 14 | "10": "Electronics & Instrumentation Engineering", 15 | "11": "BioMedical Engineering", 16 | "12": "Information Technology", 17 | "13": "Electronics & Control Engineering", 18 | "19": "Electronics & Computer Engineering", 19 | "21": "Aeronautical Engineering", 20 | "22": "Instrumentation & Control Engineering", 21 | "23": "Bio Technology", 22 | "32": "CS & Business Systems", 23 | "33": "CS & IT", 24 | "34": "IT and Engineering", 25 | "35": "Artificial Intelligence", 26 | "36": "CS and Technology", 27 | "56": "Computer Engineering ( SE ) Technology", 28 | "62": "CSE ( Cyber Security ) Technology", 29 | "66": "CSE ( AI and ML )", 30 | "67": "CSE ( Datascience )", 31 | "69": "CSE ( IoT )", 32 | "70": "CSE ( Networks )", 33 | "72": "AI & Data Science", 34 | "73": "AI & ML", 35 | "74": "Computer Science and Design", 36 | "75": "Automation and Robotics", 37 | }; 38 | -------------------------------------------------------------------------------- /constants/homeLinks.tsx: -------------------------------------------------------------------------------- 1 | export const homeLinks = [ 2 | { 3 | title: "Academic Result", 4 | description: 5 | " Access your overall academic performance with just an hallticket.", 6 | link: "/academicresult", 7 | }, 8 | { 9 | title: "Credit Checker", 10 | description: 11 | "Check your credits to find out how many you need to move on to the next year or to graduate", 12 | link: "/creditchecker", 13 | }, 14 | { 15 | title: "Jobs and Careers", 16 | description: 17 | "Explore carrer paths!!!... Find internships, jobs and kickstart your professional journey", 18 | link: "/carrers", 19 | }, 20 | { 21 | title: "Syllabus", 22 | description: 23 | "Access detailed syllabus subject wise for your academic year.", 24 | link: "/syllabus", 25 | }, 26 | { 27 | title: "Backlog Report", 28 | description: "Access your overall backlogs report with an hallticket", 29 | link: "/backlogreport", 30 | }, 31 | // { 32 | // title: "Results Contrast", 33 | // description: 34 | // "Compare your academic performance across all semesters with your classmate.", 35 | // link: "/resultcontrast", 36 | // }, 37 | { 38 | title: "Class Results", 39 | description: 40 | "View the results of your classmates and compare your performance with theirs", 41 | link: "classresult", 42 | }, 43 | ]; 44 | -------------------------------------------------------------------------------- /components/customfunctions/performanceanalysis.tsx: -------------------------------------------------------------------------------- 1 | import { getLocalStoragedata } from "../api/fetchAcademicResult"; 2 | 3 | function PerformanceAnalysis(htno: string | undefined) { 4 | const details = getLocalStoragedata(String(htno)); 5 | 6 | if (details === null || details === undefined) { 7 | return {}; 8 | } 9 | 10 | const calculatePercentage = (cgpa: string) => 11 | cgpa !== "-" ? ((parseFloat(cgpa) - 0.5) * 10).toFixed(2) : "-"; 12 | 13 | const calculateCredits = (results: any) => 14 | Object.values(results).reduce( 15 | (total: any, semester: any) => 16 | total + 17 | Object.values(semester).reduce((semesterTotal: any, subject: any) => { 18 | const credit = subject["subject_credits"]; 19 | return semesterTotal + (credit !== undefined ? Number(credit) : 0); 20 | }, 0), 21 | 0, 22 | ); 23 | const backlogs: number = Object.values(details.value.Results).reduce( 24 | (totalBacklogs: number, semester: any): number => 25 | totalBacklogs + 26 | Object.values(semester).filter((subject: any): boolean => 27 | ["F", "Ab", "-"].includes(subject.subject_grade), 28 | ).length, 29 | 0, 30 | ); 31 | const { Results } = details.value; 32 | const CGPA = Results["Total"] || "-"; 33 | 34 | const performance = { 35 | CGPA, 36 | Percentage: calculatePercentage(CGPA), 37 | Backlogs: backlogs, 38 | Credits: calculateCredits(Results), 39 | }; 40 | 41 | return performance; 42 | } 43 | 44 | export { PerformanceAnalysis }; 45 | -------------------------------------------------------------------------------- /app/creditchecker/result/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import React from "react"; 3 | import { useRouter, useSearchParams } from "next/navigation"; 4 | import ResultDetails from "@/components/result/details"; 5 | import QuickNavigation from "@/components/navbar/quicknavigation"; 6 | import { getFromLocalStorage } from "@/components/customfunctions/localStorage"; 7 | import CreditsCheckerResult from "@/components/result/creditscheckerresult"; 8 | 9 | const CreditCheckerResult = () => { 10 | const router = useRouter(); 11 | const htno = useSearchParams().get("htno"); 12 | if (htno == null) { 13 | router.push("/creditchecker"); 14 | return; 15 | } 16 | const creditsCheckerReport = getFromLocalStorage( 17 | String(htno) + "-CreditsCheckerreport", 18 | ); 19 | if (creditsCheckerReport === null) { 20 | router.push("/creditchecker"); 21 | } 22 | return ( 23 | <> 24 |
25 |
26 |
CREDITS CHECKER
27 |
28 | 29 | 33 |
34 |
35 | jntuhresults.vercel.app 36 |
37 | 38 | 39 | ); 40 | }; 41 | 42 | export default CreditCheckerResult; 43 | -------------------------------------------------------------------------------- /components/ui/radio-group.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as RadioGroupPrimitive from "@radix-ui/react-radio-group" 5 | import { Circle } from "lucide-react" 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const RadioGroup = React.forwardRef< 10 | React.ElementRef, 11 | React.ComponentPropsWithoutRef 12 | >(({ className, ...props }, ref) => { 13 | return ( 14 | 19 | ) 20 | }) 21 | RadioGroup.displayName = RadioGroupPrimitive.Root.displayName 22 | 23 | const RadioGroupItem = React.forwardRef< 24 | React.ElementRef, 25 | React.ComponentPropsWithoutRef 26 | >(({ className, ...props }, ref) => { 27 | return ( 28 | 36 | 37 | 38 | 39 | 40 | ) 41 | }) 42 | RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName 43 | 44 | export { RadioGroup, RadioGroupItem } 45 | -------------------------------------------------------------------------------- /app/notifications/examcode/page.tsx: -------------------------------------------------------------------------------- 1 | import NotificationExamCode from "@/components/notifications/notificationExamCode"; 2 | 3 | export async function generateMetadata({ 4 | searchParams, 5 | }: { 6 | searchParams: { 7 | link?: string; 8 | date?: string; 9 | formatted_date?: string; 10 | title?: string; 11 | }; 12 | }) { 13 | const { title = "", formatted_date = "", date = "" } = searchParams; 14 | 15 | return { 16 | title: title ? `${title} | JNTUH RESULTS` : "JNTUH RESULTS | Notifications", 17 | description: title 18 | ? `Check ${title} released on ${formatted_date || date}.` 19 | : "Check out JNTUH notifications in one place.", 20 | openGraph: { 21 | title: title || "JNTUH RESULTS", 22 | description: `Exam Notification - ${title} (${formatted_date || date})`, 23 | type: "website", 24 | siteName: "JNTUH RESULTS", 25 | }, 26 | twitter: { 27 | card: "summary_large_image", 28 | title: title || "JNTUH RESULTS", 29 | description: `Exam Notification - ${title} (${formatted_date || date})`, 30 | }, 31 | }; 32 | } 33 | 34 | export default function ExamcodePage({ 35 | searchParams, 36 | }: { 37 | searchParams: { 38 | link?: string; 39 | date?: string; 40 | formatted_date?: string; 41 | title?: string; 42 | }; 43 | }) { 44 | const { 45 | link = "", 46 | date = "", 47 | formatted_date = "", 48 | title = "", 49 | } = searchParams; 50 | 51 | if (!link || !date || !formatted_date || !title) { 52 | return

Invalid notification link

; 53 | } 54 | 55 | return ( 56 | 62 | ); 63 | } 64 | -------------------------------------------------------------------------------- /app/creditchecker/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { fetchCreditsCheckerReport } from "@/components/api/fetchResults"; 4 | import Footer from "@/components/footer/footer"; 5 | import Form from "@/components/forms/resulthtnoform"; 6 | import Loading from "@/components/loading/loading"; 7 | import { useRouter } from "next/navigation"; 8 | import React, { useEffect, useState } from "react"; 9 | import toast from "react-hot-toast"; 10 | 11 | const CreditChecker = () => { 12 | const [loading, setLoading] = useState(false); 13 | const [hallticketno, sethallticketno] = useState(""); 14 | const [isCooldown, setIsCooldown] = useState(false); 15 | 16 | const router = useRouter(); 17 | useEffect(() => {}, []); 18 | 19 | const onSubmit = async () => { 20 | if (isCooldown) return; 21 | if (hallticketno.length < 10) { 22 | toast.error("The Hallticket should be of 10 digits"); 23 | return; 24 | } 25 | 26 | setIsCooldown(true); 27 | try { 28 | const result = await fetchCreditsCheckerReport(hallticketno); 29 | if (result) { 30 | router.push("/creditchecker/result?htno=" + hallticketno); 31 | } 32 | } catch (error) { 33 | console.log("Error while fetching the academic result :", error); 34 | } 35 | setLoading(false); 36 | setTimeout(() => { 37 | setIsCooldown(false); 38 | toast.dismiss(); 39 | }, 10000); 40 | }; 41 | 42 | return loading ? ( 43 | 44 | ) : ( 45 | <> 46 |
53 |