Skip to content

Commit

Permalink
fix ntop loader with version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
gokulkrishh committed Dec 9, 2023
1 parent b532042 commit aa221ef
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 45 deletions.
17 changes: 1 addition & 16 deletions components/context/sidebar-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
'use client';

import { usePathname, useRouter } from 'next/navigation';

import { createContext, useContext, useEffect, useMemo, useState } from 'react';

import * as NProgress from 'nprogress';
import { createContext, useContext, useMemo, useState } from 'react';

const SidebarContext = createContext(null);

interface Sidebar {
Sidebar: Array<any>;
}

type Props = {
children: React.ReactNode;
};
Expand All @@ -22,13 +14,6 @@ export const SidebarContextProvider = (props: Props) => {

const value = useMemo(() => ({ show, setShow }), [show, setShow]);

const pathname = usePathname();
const router = useRouter();

useEffect(() => {
NProgress.done();
}, [pathname, router]);

return <SidebarContext.Provider value={value as any}>{children}</SidebarContext.Provider>;
};

Expand Down
265 changes: 239 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"debounce": "^2.0.0",
"encoding": "^0.1.13",
"eslint": "8.55.0",
"eslint-config-next": "14.0.3",
"eslint-config-next": "14.0.4",
"lucide-react": "^0.294.0",
"next": "14.0.3",
"next": "14.0.4",
"next-themes": "^0.2.1",
"nextjs-toploader": "^1.6.4",
"postcss": "8.4.32",
Expand All @@ -85,7 +85,7 @@
"husky": "^8.0.3",
"prettier": "3.1.0",
"prettier-plugin-tailwindcss": "^0.5.9",
"@types/node": "20.10.3",
"@types/node": "20.10.4",
"@types/react": "18.2.42",
"@types/react-dom": "18.2.17"
}
Expand Down

1 comment on commit aa221ef

@vercel
Copy link

@vercel vercel bot commented on aa221ef Dec 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.