diff --git a/src/screens/StarterPack/StarterPackLandingScreen.tsx b/src/screens/StarterPack/StarterPackLandingScreen.tsx
index ab81e790cf..4bee5c0d38 100644
--- a/src/screens/StarterPack/StarterPackLandingScreen.tsx
+++ b/src/screens/StarterPack/StarterPackLandingScreen.tsx
@@ -55,15 +55,22 @@ export function LandingScreen({
isError: isErrorStarterPack,
} = useStarterPackQuery({did, rkey})
+ const isValid =
+ starterPack &&
+ AppBskyGraphDefs.validateStarterPackView(starterPack) &&
+ AppBskyGraphStarterpack.validateRecord(starterPack.record)
+
React.useEffect(() => {
- if (isErrorDid || isErrorStarterPack) {
+ if (isErrorDid || isErrorStarterPack || (starterPack && !isValid)) {
setScreenState(LoggedOutScreenState.S_LoginOrCreateAccount)
}
- }, [isErrorDid, isErrorStarterPack, setScreenState])
+ }, [isErrorDid, isErrorStarterPack, setScreenState, isValid, starterPack])
- if (!did || !starterPack) {
+ if (!did || !starterPack || !isValid) {
return (
-
+
)
}