diff --git a/app/layout.tsx b/app/layout.tsx
index 23197be8..7f56f18d 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,15 +1,14 @@
import "../styles/globals.css";
import { headers } from "next/headers";
import Fathom from "@/components/Fathom/Fathom";
-// import ProgressBar from "@/components/ProgressBar/ProgressBar";
import ThemeProvider from "@/components/Theme/ThemeProvider";
import { TRPCReactProvider } from "@/server/trpc/react";
import Footer from "@/components/Footer/Footer";
import Nav from "@/components/Nav/Nav";
import { getServerAuthSession } from "@/server/auth";
import AuthProvider from "@/context/AuthProvider";
+import NextTopLoader from "nextjs-toploader";
// @TODO layout app in way that doesn't need to use client session check
-
export const metadata = {
title: "CodĂș - The Web Developer Community",
description:
@@ -31,9 +30,13 @@ export default async function RootLayout({
const session = await getServerAuthSession();
return (
- {/* Needs to be fixed */}
+
diff --git a/components/ProgressBar/ProgressBar.tsx b/components/ProgressBar/ProgressBar.tsx
deleted file mode 100644
index 7aafe420..00000000
--- a/components/ProgressBar/ProgressBar.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-"use client";
-
-//@TODO fix this!
-
-import { useNProgress } from "@tanem/react-nprogress";
-import { useEffect, useState } from "react";
-import { useRouter } from "next/navigation";
-
-const ProgressBar = () => {
- const router = useRouter();
-
- const [isAnimating, setIsAnimating] = useState(false);
-
- const { animationDuration, isFinished, progress } = useNProgress({
- isAnimating,
- });
-
- useEffect(() => {
- function onRouteChangeStart() {
- setIsAnimating(true);
- }
-
- function onRouteChangeComplete() {
- setIsAnimating(false);
- }
-
- router.events.on("routeChangeStart", onRouteChangeStart);
- router.events.on("routeChangeComplete", onRouteChangeComplete);
-
- // Unassign event listener
- return () => {
- router.events.off("routeChangeComplete", onRouteChangeComplete);
- router.events.off("routeChangeStart", onRouteChangeStart);
- };
- }, [router]);
-
- return (
-
- );
-};
-
-export default ProgressBar;
diff --git a/next-env.d.ts b/next-env.d.ts
index fd36f949..4f11a03d 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,6 +1,5 @@
///
///
-///
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/package-lock.json b/package-lock.json
index 366969b9..378506fd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,7 +24,6 @@
"@sentry/nextjs": "^7.73.0",
"@styled-icons/material": "^10.47.0",
"@tailwindcss/forms": "^0.5.6",
- "@tanem/react-nprogress": "^5.0.49",
"@tanstack/react-query": "^4.35.0",
"@tiptap/extension-color": "^2.1.6",
"@tiptap/extension-highlight": "^2.1.6",
@@ -63,6 +62,7 @@
"next-auth": "^4.23.1",
"next-superjson-plugin": "^0.5.9",
"next-themes": "^0.2.1",
+ "nextjs-toploader": "^1.5.3",
"nodemailer": "^6.9.4",
"prismjs": "^1.29.0",
"react": "^18.2.0",
@@ -5946,19 +5946,6 @@
"tailwindcss": ">=3.0.0 || insiders"
}
},
- "node_modules/@tanem/react-nprogress": {
- "version": "5.0.51",
- "resolved": "https://registry.npmjs.org/@tanem/react-nprogress/-/react-nprogress-5.0.51.tgz",
- "integrity": "sha512-YxNUCpznuBVA+PhjEzFmxaa1czXgU+5Ojchw5JBK7DQS6SHIgNudpFohWpNBWMu2KWByGJ2OLH2OwbM/XyP18Q==",
- "dependencies": {
- "@babel/runtime": "^7.22.15",
- "hoist-non-react-statics": "^3.3.2"
- },
- "peerDependencies": {
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
- }
- },
"node_modules/@tanstack/query-core": {
"version": "4.36.1",
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.36.1.tgz",
@@ -6934,6 +6921,11 @@
"@types/node": "*"
}
},
+ "node_modules/@types/nprogress": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/@types/nprogress/-/nprogress-0.2.2.tgz",
+ "integrity": "sha512-2wLrSJXLztGmr7wXwM0hA/wuIOY9DznVdd+ZFofHOiXcj9JnVt+2ZeLRJ7v5ZVlmheSkUOSg3Q3O4Ce7yji79A=="
+ },
"node_modules/@types/object.omit": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@types/object.omit/-/object.omit-3.0.1.tgz",
@@ -13462,6 +13454,21 @@
"url": "https://github.com/sponsors/colinhacks"
}
},
+ "node_modules/nextjs-toploader": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/nextjs-toploader/-/nextjs-toploader-1.5.3.tgz",
+ "integrity": "sha512-kNqgpOxVeo7ihMZqNzxtsCNcO0lo1NNjxhCtnJ2qgTKxgppMGpuSVU4FTMaCOefamVop1mWk1Ij3C2pBP5NwPg==",
+ "dependencies": {
+ "@types/nprogress": "^0.2.1",
+ "nprogress": "^0.2.0",
+ "prop-types": "^15.8.1"
+ },
+ "peerDependencies": {
+ "next": ">= 6.0.0",
+ "react": ">= 16.0.0",
+ "react-dom": ">= 16.0.0"
+ }
+ },
"node_modules/node-abi": {
"version": "3.50.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.50.0.tgz",
@@ -13594,6 +13601,11 @@
"node": ">=8"
}
},
+ "node_modules/nprogress": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz",
+ "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA=="
+ },
"node_modules/nth-check": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
@@ -14510,7 +14522,6 @@
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
"integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
- "dev": true,
"dependencies": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
@@ -14520,8 +14531,7 @@
"node_modules/prop-types/node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
- "dev": true
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
"node_modules/prosemirror-changeset": {
"version": "2.2.1",
diff --git a/package.json b/package.json
index 49fe6dee..c2ca4956 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,6 @@
"@sentry/nextjs": "^7.73.0",
"@styled-icons/material": "^10.47.0",
"@tailwindcss/forms": "^0.5.6",
- "@tanem/react-nprogress": "^5.0.49",
"@tanstack/react-query": "^4.35.0",
"@tiptap/extension-color": "^2.1.6",
"@tiptap/extension-highlight": "^2.1.6",
@@ -77,6 +76,7 @@
"next-auth": "^4.23.1",
"next-superjson-plugin": "^0.5.9",
"next-themes": "^0.2.1",
+ "nextjs-toploader": "^1.5.3",
"nodemailer": "^6.9.4",
"prismjs": "^1.29.0",
"react": "^18.2.0",
diff --git a/styles/globals.css b/styles/globals.css
index cd42f16f..85a5a874 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -350,3 +350,19 @@ table div {
transform: translate(24px, 0);
}
}
+
+@layer {
+ .gradient {
+ background-image: linear-gradient(
+ to right,
+ rgb(251, 146, 60),
+ rgb(219, 39, 119)
+ );
+ height: 0.25rem;
+ width: 100%;
+ left: 0px;
+ top: 0px;
+ position: fixed;
+ z-index: 50;
+ }
+}