Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

remove nprogress #341

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/data-exchange/config/store.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import NProgress from 'nprogress';
import { create } from 'zustand';
import { shallow } from 'zustand/shallow';

Expand Down
4 changes: 1 addition & 3 deletions examples/data-exchange/lib/navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import React from 'react';
import { usePathname, useSearchParams } from 'next/navigation';
import NProgress from 'nprogress';

import { useIsNavigating } from '@/config/store';

export function navigateStart() {
NProgress.start();
useIsNavigating.getState().setIsNavigation(true);
}

export function navigateEnd() {
NProgress.done();
useIsNavigating.getState().setIsNavigation(false);
}

Expand Down
9 changes: 4 additions & 5 deletions examples/district/lib/navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { useIsNavigating } from '@/config/store';
import { usePathname, useSearchParams } from 'next/navigation';
import NProgress from 'nprogress';
import React from 'react';
import { usePathname, useSearchParams } from 'next/navigation';

import { useIsNavigating } from '@/config/store';

export function navigateStart() {
NProgress.start();
useIsNavigating.getState().setIsNavigation(true);
}

export function navigateEnd() {
NProgress.done();
useIsNavigating.getState().setIsNavigation(false);
}

Expand Down
9 changes: 4 additions & 5 deletions examples/drr/lib/navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { useIsNavigating } from '@/config/store';
import { usePathname, useSearchParams } from 'next/navigation';
import NProgress from 'nprogress';
import React from 'react';
import { usePathname, useSearchParams } from 'next/navigation';

import { useIsNavigating } from '@/config/store';

export function navigateStart() {
NProgress.start();
useIsNavigating.getState().setIsNavigation(true);
}

export function navigateEnd() {
NProgress.done();
useIsNavigating.getState().setIsNavigation(false);
}

Expand Down