0.1.32 • Published 2 years ago

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

Weekly downloads
-
License
-
Repository
-
Last release
2 years 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

2 years ago

0.1.31

2 years ago

0.1.29

2 years ago

0.1.28

2 years ago

0.1.27

2 years ago

0.1.26

2 years ago

0.1.25

2 years ago

0.1.24

2 years ago

0.1.23

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago