-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from Gurubase/task/guru-edit-speedup
Refactor guru detail fetching to support single guru retrieval
- Loading branch information
Showing
16 changed files
with
81 additions
and
106 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
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
14 changes: 3 additions & 11 deletions
14
src/gurubase-frontend/src/app/guru/[customGuru]/analytics/page.js
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,19 +1,11 @@ | ||
import { redirect } from "next/navigation"; | ||
|
||
import { getMyGurus } from "@/app/actions"; | ||
import { getMyGuru } from "@/app/actions"; | ||
import AnalyticsPageLayout from "@/components/Analytics/AnalyticsPageLayout"; | ||
|
||
export default async function AnalyticsPage({ params, searchParams }) { | ||
const { customGuru } = params; | ||
const interval = searchParams.interval || "30d"; | ||
|
||
const guruTypes = await getMyGurus(); | ||
const guruData = await getMyGuru(customGuru); | ||
|
||
return ( | ||
<AnalyticsPageLayout | ||
customGuru={customGuru} | ||
guruTypes={guruTypes} | ||
initialInterval={interval} | ||
/> | ||
); | ||
return <AnalyticsPageLayout guruData={guruData} initialInterval={interval} />; | ||
} |
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
9 changes: 4 additions & 5 deletions
9
src/gurubase-frontend/src/app/guru/[customGuru]/integrations/page.js
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,16 +1,15 @@ | ||
import { getMyGurus } from "@/app/actions"; | ||
import { getMyGuru } from "@/app/actions"; | ||
import IntegrationPayeLayout from "@/components/Integrations/IntegrationPayeLayout"; | ||
import IntegrationTypesList from "@/components/Integrations/IntegrationTypesList"; | ||
|
||
export default async function IntegrationsPage({ params }) { | ||
const { customGuru } = params; | ||
const guruTypes = await getMyGurus(); | ||
const customGuruData = await getMyGuru(customGuru); | ||
|
||
return ( | ||
<IntegrationPayeLayout | ||
content={<IntegrationTypesList customGuru={customGuru} />} | ||
customGuru={customGuru} | ||
guruTypes={guruTypes} | ||
content={<IntegrationTypesList guruData={customGuruData} />} | ||
guruData={customGuruData} | ||
/> | ||
); | ||
} |
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.