Skip to content

Commit

Permalink
props updated
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmehta committed Nov 22, 2023
1 parent c3f087f commit 1779e96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions apps/platform/src/pages/HomePage/PPHomePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ function HelpBoxPanel({ fai, url, label, external }) {
);
}

function HomePage() {
function HomePage({ suggestions }) {
const classes = useStyles();
const suggestions = getSuggestedSearch();

const handleScrollDown = () => {
window.scrollTo({ top: window.innerHeight, left: 0, behavior: "smooth" });
Expand Down
12 changes: 6 additions & 6 deletions apps/platform/src/pages/HomePage/index.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import PublicHome from './HomePage';
import PPHome from './PPHomePage';
import { usePermissions } from 'ui';
import PublicHome from "./HomePage";
import PPHome from "./PPHomePage";
import { usePermissions } from "ui";

function GetHomePage() {
function GetHomePage({ suggestions }) {
const { isPartnerPreview } = usePermissions();
if (isPartnerPreview) return <PPHome />;
return <PublicHome />;
if (isPartnerPreview) return <PPHome suggestions={suggestions} />;
return <PublicHome suggestions={suggestions} />;
}

export default GetHomePage;

0 comments on commit 1779e96

Please sign in to comment.