Skip to main content

@supertokens-plugins/profile-base-react

Type Aliases

RegisterSection()

type RegisterSection = (sectionBuilder: () => Promise<Section | Section[]>) => void;

Defined in: supertokens-plugins/packages/profile-base-react/src/types.ts:24

Parameters

ParameterType
sectionBuilder() => Promise<Section | Section[]>

Returns

void

Section

type Section = Omit<SuperTokensPluginProfileSection, "order"> & {
order?: number;
};

Defined in: supertokens-plugins/packages/profile-base-react/src/types.ts:21

Type Declaration

SuperTokensPluginProfileConfig

type SuperTokensPluginProfileConfig = {
profilePagePath?: string;
sections?: SuperTokensPluginProfileSection[];
};

Defined in: supertokens-plugins/packages/profile-base-react/src/types.ts:5

Properties

SuperTokensPluginProfileNormalisedConfig

type SuperTokensPluginProfileNormalisedConfig = Required<SuperTokensPluginProfileConfig>;

Defined in: supertokens-plugins/packages/profile-base-react/src/types.ts:10

SuperTokensPluginProfileSection

type SuperTokensPluginProfileSection = {
component: () => React.JSX.Element;
icon?: () => React.JSX.Element;
id: string;
order: number;
title: string;
};

Defined in: supertokens-plugins/packages/profile-base-react/src/types.ts:12

Properties

PropertyTypeDescriptionDefined in
component() => React.JSX.Element-supertokens-plugins/packages/profile-base-react/src/types.ts:18
icon?() => React.JSX.Element-supertokens-plugins/packages/profile-base-react/src/types.ts:17
idstring-supertokens-plugins/packages/profile-base-react/src/types.ts:13
ordernumberthis is needed to allow controlling the order of the sections, because in some cases the registration order is not the same as the order of the sections because of async initializationssupertokens-plugins/packages/profile-base-react/src/types.ts:16
titlestring-supertokens-plugins/packages/profile-base-react/src/types.ts:14

TranslationKeys

type TranslationKeys = keyof typeof defaultTranslations["en"];

Defined in: supertokens-plugins/packages/profile-base-react/src/types.ts:26

Variables

default

default: {
init: any;
PLUGIN_ID: string;
usePluginContext: any;
UserProfileWrapper: () => Element;
};

Defined in: supertokens-plugins/packages/profile-base-react/src/index.ts:6

Type Declaration

default

const default: Meta<(__namedParameters: {
sections: {
component: () => Element;
id: string;
title: string | Element;
}[];
}) => Element>;

Defined in: supertokens-plugins/packages/profile-base-react/src/components/profile-sections/profile-sections-in-card.stories.tsx:9

More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export

default

const default: Meta<(__namedParameters: {
sections: {
component: () => Element;
id: string;
title: string | Element;
}[];
}) => Element>;

Defined in: supertokens-plugins/packages/profile-base-react/src/components/profile-sections/profile-sections.stories.tsx:7

More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export

DEFAULT_PROFILE_PAGE_PATH

const DEFAULT_PROFILE_PAGE_PATH: "/user/profile" = "/user/profile";

Defined in: supertokens-plugins/packages/profile-base-react/src/constants.ts:6

defaultTranslations

const defaultTranslations: {
en: {
PL_PB_USER_PROFILE: "User Profile";
};
};

Defined in: supertokens-plugins/packages/profile-base-react/src/translations.ts:1

Type Declaration

NameTypeDefault valueDefined in
en{ PL_PB_USER_PROFILE: "User Profile"; }-supertokens-plugins/packages/profile-base-react/src/translations.ts:2
en.PL_PB_USER_PROFILE"User Profile""User Profile"supertokens-plugins/packages/profile-base-react/src/translations.ts:3

enableDebugLogs

enableDebugLogs: any;

Defined in: supertokens-plugins/packages/profile-base-react/src/logger.ts:5

init

const init: any;

Defined in: supertokens-plugins/packages/profile-base-react/src/plugin.ts:27

logDebugMessage

logDebugMessage: any;

Defined in: supertokens-plugins/packages/profile-base-react/src/logger.ts:5

PLUGIN_ID

const PLUGIN_ID: "supertokens-plugin-profile-base" = "supertokens-plugin-profile-base";

Defined in: supertokens-plugins/packages/profile-base-react/src/constants.ts:1

PLUGIN_VERSION

const PLUGIN_VERSION: "0.0.1" = "0.0.1";

Defined in: supertokens-plugins/packages/profile-base-react/src/constants.ts:2

SECTION_ORDER_INCREMENT

const SECTION_ORDER_INCREMENT: 1000 = 1000;

Defined in: supertokens-plugins/packages/profile-base-react/src/constants.ts:4

usePluginContext

usePluginContext: any;

Defined in: supertokens-plugins/packages/profile-base-react/src/plugin.ts:18

WithoutSections

const WithoutSections: Story;

Defined in: supertokens-plugins/packages/profile-base-react/src/components/profile-sections/profile-sections-in-card.stories.tsx:28

More on writing stories with args: https://storybook.js.org/docs/writing-stories/args

WithoutSections

const WithoutSections: Story;

Defined in: supertokens-plugins/packages/profile-base-react/src/components/profile-sections/profile-sections.stories.tsx:22

More on writing stories with args: https://storybook.js.org/docs/writing-stories/args

WithSections

const WithSections: Story;

Defined in: supertokens-plugins/packages/profile-base-react/src/components/profile-sections/profile-sections-in-card.stories.tsx:34

WithSections

const WithSections: Story;

Defined in: supertokens-plugins/packages/profile-base-react/src/components/profile-sections/profile-sections.stories.tsx:28

Functions

ProfilePageWrapper()

function ProfilePageWrapper(__namedParameters: {
children: ReactNode;
style?: CSSProperties;
}): Element;

Defined in: supertokens-plugins/packages/profile-base-react/src/components/page-wrapper/page-wrapper.tsx:8

Parameters

ParameterType
__namedParameters{ children: ReactNode; style?: CSSProperties; }
__namedParameters.childrenReactNode
__namedParameters.style?CSSProperties

Returns

Element

ProfileSections()

function ProfileSections(__namedParameters: {
sections: {
component: () => Element;
id: string;
title: string | Element;
}[];
}): Element;

Defined in: supertokens-plugins/packages/profile-base-react/src/components/profile-sections/profile-sections.tsx:9

Parameters

ParameterType
__namedParameters{ sections: { component: () => Element; id: string; title: string | Element; }[]; }
__namedParameters.sections{ component: () => Element; id: string; title: string | Element; }[]

Returns

Element

UserProfilePage()

function UserProfilePage(): Element;

Defined in: supertokens-plugins/packages/profile-base-react/src/user-profile-page.tsx:9

Returns

Element

UserProfileWrapper()

function UserProfileWrapper(): Element;

Defined in: supertokens-plugins/packages/profile-base-react/src/user-profile-wrapper.tsx:8

Returns

Element