forked from DIRACGrid/diracx-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Store filters in dashboard + auth redirection + scrollbar style
- Loading branch information
Showing
17 changed files
with
201 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
"use client"; | ||
import React from "react"; | ||
import { useSearchParams } from "next/navigation"; | ||
import UserDashboard from "@/components/applications/UserDashboard"; | ||
import { ApplicationsContext } from "@/contexts/ApplicationsProvider"; | ||
import { applicationList } from "@/components/applications/ApplicationList"; | ||
|
||
export default function Page() { | ||
return <UserDashboard />; | ||
const searchParams = useSearchParams(); | ||
const appId = searchParams.get("appId"); | ||
const [sections] = React.useContext(ApplicationsContext); | ||
|
||
const appType = sections | ||
.find((section) => section.items.some((item) => item.id === appId)) | ||
?.items.find((item) => item.id === appId)?.type; | ||
|
||
const Component = applicationList.find((app) => app.name === appType) | ||
?.component; | ||
|
||
return Component ? <Component /> : <UserDashboard />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.