Scope
Refactor app/login.tsx so it consumes useAuth() from wp-native-shell instead of EC's custom auth context.
Why
Once <WPNativeApp/> is the root layout (M7.2.5), the auth context comes from wp-native-shell. Every screen that calls useAuth() needs to import from wp-native-shell instead of ../src/auth/context.
Files affected
The change is mostly:
// Before:
import { useAuth } from '../src/auth/context';
// After:
import { useAuth } from 'wp-native-shell';
The hook contract is identical (per SHELL.md M5.1) — same login(), logout(), user, isAuthenticated, etc. Just the import path changes.
Things to verify
Sequencing
After M7.2.5. Potentially landed in the same PR as M7.2.5 if the diff is small.
Acceptance
References
Scope
Refactor
app/login.tsxso it consumesuseAuth()fromwp-native-shellinstead of EC's custom auth context.Why
Once
<WPNativeApp/>is the root layout (M7.2.5), the auth context comes from wp-native-shell. Every screen that callsuseAuth()needs to import fromwp-native-shellinstead of../src/auth/context.Files affected
The change is mostly:
The hook contract is identical (per SHELL.md M5.1) — same
login(),logout(),user,isAuthenticated, etc. Just the import path changes.Things to verify
loginWithGoogle()either still works (if M7.2.3 kept the OAuth bits in a sibling hook) OR is documented as deferred per wp-native#18Sequencing
After M7.2.5. Potentially landed in the same PR as M7.2.5 if the diff is small.
Acceptance
useAuthimports inapp/login.tsxcome fromwp-native-shellnpx tsc --noEmitpassesReferences