Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Initializer] Personalize Initializer Add-on #939

Merged
merged 17 commits into from
Mar 4, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
added components props to personalize intializer
addy-pathania committed Mar 3, 2022
commit 381b9ef42c6e955ffb1a9bc4c74659590c5fd413
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
// NULL means Hidden by this experience
import {
ComponentParams,
ComponentRendering,
SitecoreContextValue,
} from '@sitecore-jss/sitecore-jss-nextjs';

/**
* Shared component props
*/
export type ComponentProps = {
rendering: ComponentRendering;
params: ComponentParams;
};

/**
* Component props with context
* You can access `sitecoreContext` by withSitecoreContext/useSitecoreContext
* @example withSitecoreContext()(ContentBlock)
* @example const { sitecoreContext } = useSitecoreContext()
*/
export type ComponentWithContextProps = ComponentProps & {
sitecoreContext: SitecoreContextValue;
};


// NULL means Hidden by this experience
export type ComponentRenderingWithExpiriences = ComponentRendering & {
experiences: { [name: string]: ComponentRenderingWithExpiriences | null };
};