@alsocoder/apna-panel-auth
v0.1.0
Published
Auth pages and session gate for @alsocoder/apna-panel.
Readme
@alsocoder/apna-panel-auth
Login layout, login page, and session gate for @alsocoder/apna-panel.
Install
npm install @alsocoder/apna-panel-auth @alsocoder/apna-panel @alsocoder/apna-inputimport "@alsocoder/apna-panel-auth/styles.css"
import { ApnaPanelLoginPage, ApnaPanelSessionGate } from "@alsocoder/apna-panel-auth"Usage
<Route
path="/login"
element={
<ApnaPanelLoginPage
redirectTo="/"
onNavigate={(href) => navigate(href)}
/>
}
/>
<ApnaPanelSessionGate
loginPath="/login"
onRedirectToLogin={(path) => navigate(path)}
>
<ApnaPanelShell>...</ApnaPanelShell>
</ApnaPanelSessionGate>