mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
chore: fix root paths for navigation
This commit is contained in:
parent
f160ec767d
commit
6c2e39b2d3
@ -13,6 +13,13 @@ import 'package:spotube/hooks/use_update_checker.dart';
|
||||
import 'package:spotube/provider/authentication_provider.dart';
|
||||
import 'package:spotube/provider/downloader_provider.dart';
|
||||
|
||||
const rootPaths = {
|
||||
0: "/",
|
||||
1: "/search",
|
||||
2: "/library",
|
||||
3: "/lyrics",
|
||||
};
|
||||
|
||||
class RootApp extends HookConsumerWidget {
|
||||
final Widget child;
|
||||
const RootApp({
|
||||
@ -26,13 +33,6 @@ class RootApp extends HookConsumerWidget {
|
||||
final isMounted = useIsMounted();
|
||||
final auth = ref.watch(AuthenticationNotifier.provider);
|
||||
|
||||
final rootPaths = [
|
||||
"/",
|
||||
if (auth != null) "/search",
|
||||
"/library",
|
||||
if (auth != null) "/lyrics",
|
||||
].asMap();
|
||||
|
||||
final downloader = ref.watch(downloaderProvider);
|
||||
useEffect(() {
|
||||
downloader.onFileExists = (track) async {
|
||||
|
Loading…
Reference in New Issue
Block a user