0.1.32 • Published 1 year ago

pj-package-portal-verifyme-test v0.1.32

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Picklejar Package: Portal Verify Me

Description

Picklejar portal verify me is a package that provides a PicklejarIDVerification component.

Installation

yarn install picklejar-package-portal-vefiryme

Picklejar ID Verification Landing Page Usage

  • Import the package
import { PicklejarIDVerification } from 'package-portal-verifyme';
  • Wrap your app with the AppContext, UserProvider, NotificationProvider and ThemeProvider components
<PicklejarIDVerification redirectOnSuccess={PICKLEJAR_DEFAULT_PROFILE_PAGE_URL}/>;

Picklejar ID Verification Landing Page Usage

  • Import the package
import { PicklejarIDVerification } from 'package-portal-verifyme';
  • Wrap your app with the AppContext, UserProvider, NotificationProvider and ThemeProvider components
const App = props => {
  const { sessionKey } = props;

  const environment = useMemo(() => getEnvironment(), []);

  const apiHost = getApiHost(environment);
  const host = getHost(environment);

  const appContextValue = useMemo(() => (
    { host, apiHost }
  ), [host, apiHost]);
  return (
    <AppContext.Provider value={appContextValue}>
      <UserProvider sessionKey={sessionKey}>
        <NotificationProvider>
          <NotificationBar/>
          <UserContext.Consumer>
            {context => {
              const { isLogged, status } = context;
              return (
                <ThemeProvider theme={PicklejarTheme}>
                  <div className="App">
                    ...
                    <Routes>
                      {isLogged && <Route
                        exact
                        path="/verify-id"
                        element={<PicklejarIDVerification redirectOnSuccess={PICKLEJAR_DEFAULT_PROFILE_PAGE_URL}/>}
                      />}
                    </Routes>
                    ...
                  </div>
                </ThemeProvider>
              );
            }}
          </UserContext.Consumer>
        </NotificationProvider>
      </UserProvider>
    </AppContext.Provider>
  );
};

App.defaultProps = {
  sessionKey: 'session_key_value'
};

App.propTypes = {
  sessionKey: PropTypes.string
};

export default App;
0.1.32

1 year ago

0.1.31

1 year ago

0.1.29

1 year ago

0.1.28

1 year ago

0.1.27

1 year ago

0.1.26

1 year ago

0.1.25

1 year ago

0.1.24

1 year ago

0.1.23

1 year ago

0.1.22

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.19

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago