about summary refs log tree commit diff
path: root/src/components/SearchError.tsx
diff options
context:
space:
mode:
authorChenyu <10610892+BinaryFiddler@users.noreply.github.com>2025-07-24 14:44:03 -0700
committerGitHub <noreply@github.com>2025-07-24 14:44:03 -0700
commit9e65f00c937b156b876b0f6ca23dcef12b945dbe (patch)
tree252f72fab22e87b2902d6a230a43be983d4311ce /src/components/SearchError.tsx
parentc48f35d7269c8e235adf73751db8b901c8b791ce (diff)
downloadvoidsky-9e65f00c937b156b876b0f6ca23dcef12b945dbe.tar.zst
[APP-1157] disable searches for logged out users, prompt them to sign in (#8697)
Diffstat (limited to 'src/components/SearchError.tsx')
-rw-r--r--src/components/SearchError.tsx45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/components/SearchError.tsx b/src/components/SearchError.tsx
new file mode 100644
index 000000000..443bbab8f
--- /dev/null
+++ b/src/components/SearchError.tsx
@@ -0,0 +1,45 @@
+import {View} from 'react-native'
+
+import {usePalette} from '#/lib/hooks/usePalette'
+import {atoms as a, useBreakpoints} from '#/alf'
+import * as Layout from '#/components/Layout'
+import {Text} from '#/components/Typography'
+import {TimesLarge_Stroke2_Corner0_Rounded} from './icons/Times'
+
+export function SearchError({
+  title,
+  children,
+}: {
+  title?: string
+  children?: React.ReactNode
+}) {
+  const {gtMobile} = useBreakpoints()
+  const pal = usePalette('default')
+
+  return (
+    <Layout.Content>
+      <View
+        style={[
+          a.align_center,
+          a.gap_4xl,
+          a.px_xl,
+          {
+            paddingVertical: 150,
+          },
+        ]}>
+        <TimesLarge_Stroke2_Corner0_Rounded width={32} fill={pal.colors.icon} />
+        <View
+          style={[
+            a.align_center,
+            {maxWidth: gtMobile ? 394 : 294},
+            gtMobile ? a.gap_md : a.gap_sm,
+          ]}>
+          <Text style={[a.font_bold, a.text_lg, a.text_center, a.leading_snug]}>
+            {title}
+          </Text>
+          {children}
+        </View>
+      </View>
+    </Layout.Content>
+  )
+}