diff --git a/apps/admin/app/not-found.tsx b/apps/admin/app/not-found.tsx new file mode 100644 index 0000000000..fdb3303d3f --- /dev/null +++ b/apps/admin/app/not-found.tsx @@ -0,0 +1,27 @@ +import { Backpack } from 'lucide-react'; +import Link from 'next/link'; + +export default function NotFound() { + return ( +
+
+
+
+ +
+
+

404

+

Page not found

+

+ This admin page doesn't exist. Head back to the dashboard. +

+ + Back to dashboard + +
+
+ ); +} diff --git a/apps/admin/pages/404.tsx b/apps/admin/pages/404.tsx new file mode 100644 index 0000000000..0d27ffdadb --- /dev/null +++ b/apps/admin/pages/404.tsx @@ -0,0 +1,62 @@ +import { Backpack } from 'lucide-react'; + +export default function Custom404() { + return ( +
+
+
+
+ +
+
+

+ 404 +

+

+ Page not found +

+

+ This admin page doesn't exist. Head back to the dashboard. +

+ + Back to dashboard + +
+
+ ); +} diff --git a/apps/admin/pages/500.tsx b/apps/admin/pages/500.tsx new file mode 100644 index 0000000000..4380ed4d61 --- /dev/null +++ b/apps/admin/pages/500.tsx @@ -0,0 +1,80 @@ +import { AlertTriangle } from 'lucide-react'; + +export default function Custom500() { + return ( +
+
+
+
+ +
+
+

+ 500 +

+

+ Something went wrong +

+

+ An unexpected error occurred. Try again or contact support if the problem persists. +

+
+ + Back to dashboard + + + Contact support + +
+
+
+ ); +} diff --git a/apps/admin/public/_headers b/apps/admin/public/_headers new file mode 100644 index 0000000000..2d74e7653b --- /dev/null +++ b/apps/admin/public/_headers @@ -0,0 +1,5 @@ +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() diff --git a/apps/admin/wrangler.jsonc b/apps/admin/wrangler.jsonc new file mode 100644 index 0000000000..b8b489953a --- /dev/null +++ b/apps/admin/wrangler.jsonc @@ -0,0 +1,9 @@ +{ + "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", + "name": "packrat-admin", + "compatibility_date": "2024-09-23", + "assets": { + "directory": "./out", + "not_found_handling": "404-page" + } +} diff --git a/apps/expo/app/(app)/(tabs)/(home)/index.tsx b/apps/expo/app/(app)/(tabs)/(home)/index.tsx index f3a810261e..d747a476d6 100644 --- a/apps/expo/app/(app)/(tabs)/(home)/index.tsx +++ b/apps/expo/app/(app)/(tabs)/(home)/index.tsx @@ -11,7 +11,6 @@ import { import { Icon } from 'expo-app/components/Icon'; import TabScreen from 'expo-app/components/TabScreen'; import { featureFlags } from 'expo-app/config'; -import { clientEnvs } from 'expo-app/env/clientEnvs'; import { AIChatTile } from 'expo-app/features/ai/components/AIChatTile'; import { ReportedContentTile } from 'expo-app/features/ai/components/ReportedContentTile'; import { AIPacksTile } from 'expo-app/features/ai-packs/components/AIPacksTile'; @@ -33,10 +32,8 @@ import { WeatherAlertsTile } from 'expo-app/features/weather/components/WeatherA import { WeatherTile } from 'expo-app/features/weather/components/WeatherTile'; import { WildlifeTile } from 'expo-app/features/wildlife/components/WildlifeTile'; import { cn } from 'expo-app/lib/cn'; -import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme'; import { useTranslation } from 'expo-app/lib/hooks/useTranslation'; import { asNonNullableRef } from 'expo-app/lib/utils/asNonNullableRef'; -import { Link } from 'expo-router'; import { useMemo, useRef, useState } from 'react'; import { FlatList, Platform, Pressable, Text, View } from 'react-native'; @@ -158,23 +155,6 @@ const tileInfo = { type TileName = keyof typeof tileInfo; -function DemoIcon() { - const { colors } = useColorScheme(); - if (clientEnvs.NODE_ENV !== 'development') return null; - - return ( - - - {({ pressed }) => ( - - - - )} - - - ); -} - export default function DashboardScreen() { const [searchValue, setSearchValue] = useState(''); const searchBarRef = useRef(null); @@ -309,11 +289,6 @@ export default function DashboardScreen() { ), }} backVisible={false} - rightView={() => ( - - - - )} /> + + {({ pressed }) => ( + + + + )} + + + ); +} + function Profile() { const user = useUser(); const { t } = useTranslation(); @@ -94,7 +112,9 @@ function Profile() { title={t('profile.profile')} backVisible={false} rightView={() => ( - + + + )} diff --git a/apps/expo/features/packs/screens/PackListScreen.tsx b/apps/expo/features/packs/screens/PackListScreen.tsx index 83a1cb04da..b192ecc327 100644 --- a/apps/expo/features/packs/screens/PackListScreen.tsx +++ b/apps/expo/features/packs/screens/PackListScreen.tsx @@ -203,7 +203,7 @@ export function PackListScreen() { ), }} rightView={() => ( - + )} diff --git a/apps/expo/features/trips/screens/TripListScreen.tsx b/apps/expo/features/trips/screens/TripListScreen.tsx index d00662cce7..8da597fe4c 100644 --- a/apps/expo/features/trips/screens/TripListScreen.tsx +++ b/apps/expo/features/trips/screens/TripListScreen.tsx @@ -115,7 +115,7 @@ export function TripsListScreen() { ), }} rightView={() => ( - + )} diff --git a/apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx b/apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx index 42bcde2f93..8702779940 100644 --- a/apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx +++ b/apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx @@ -107,8 +107,11 @@ export default function TripWeatherDetailsScreen() { - router.back()}> - + router.back()} + hitSlop={{ top: 16, bottom: 16, left: 16, right: 16 }} + > + diff --git a/apps/expo/features/weather/screens/LocationsScreen.tsx b/apps/expo/features/weather/screens/LocationsScreen.tsx index 68e8d560f4..64dbcb8bd5 100644 --- a/apps/expo/features/weather/screens/LocationsScreen.tsx +++ b/apps/expo/features/weather/screens/LocationsScreen.tsx @@ -121,20 +121,24 @@ function LocationsScreen() { ( - router.back()} className="mr-2"> + router.back()} + className="mr-2 ml-1.5 items-center justify-center" + > )} rightView={() => ( - - - {({ pressed }) => ( - - - - )} - - + + {({ pressed }) => ( + + + + )} + )} /> diff --git a/apps/guides/package.json b/apps/guides/package.json index 6912c90117..8d451a366f 100644 --- a/apps/guides/package.json +++ b/apps/guides/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "bun run build-content && next build", "build-content": "bun run scripts/build-content.ts", - "clean": "bunx rimraf .next node_modules out .vercel", + "clean": "bunx rimraf .next node_modules out", "demo-enhancement": "bun run scripts/demo-enhancement.ts", "dev": "next dev", "enhance-content": "bun run scripts/enhance-content.ts", diff --git a/apps/guides/public/_headers b/apps/guides/public/_headers new file mode 100644 index 0000000000..2d74e7653b --- /dev/null +++ b/apps/guides/public/_headers @@ -0,0 +1,5 @@ +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() diff --git a/apps/guides/wrangler.jsonc b/apps/guides/wrangler.jsonc new file mode 100644 index 0000000000..503526d1ef --- /dev/null +++ b/apps/guides/wrangler.jsonc @@ -0,0 +1,9 @@ +{ + "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", + "name": "packrat-guides", + "compatibility_date": "2024-09-23", + "assets": { + "directory": "./out", + "not_found_handling": "404-page" + } +} diff --git a/apps/landing/package.json b/apps/landing/package.json index 6da61baf98..53d080b364 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "build": "next build", - "clean": "bunx rimraf node_modules .next out .vercel", + "clean": "bunx rimraf node_modules .next out", "dev": "next dev", "lint": "next lint", "start": "next start" diff --git a/apps/landing/public/_headers b/apps/landing/public/_headers new file mode 100644 index 0000000000..2d74e7653b --- /dev/null +++ b/apps/landing/public/_headers @@ -0,0 +1,5 @@ +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() diff --git a/apps/landing/vercel.json b/apps/landing/vercel.json deleted file mode 100644 index 3226e8d360..0000000000 --- a/apps/landing/vercel.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "headers": [ - { - "source": "/(.*)", - "headers": [ - { "key": "X-Frame-Options", "value": "DENY" }, - { "key": "X-Content-Type-Options", "value": "nosniff" }, - { "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }, - { "key": "Permissions-Policy", "value": "camera=(), microphone=(), geolocation=()" } - ] - } - ] -} diff --git a/apps/landing/wrangler.jsonc b/apps/landing/wrangler.jsonc new file mode 100644 index 0000000000..fd5c5f2502 --- /dev/null +++ b/apps/landing/wrangler.jsonc @@ -0,0 +1,9 @@ +{ + "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", + "name": "packrat-landing", + "compatibility_date": "2024-09-23", + "assets": { + "directory": "./out", + "not_found_handling": "404-page" + } +} diff --git a/bun.lock b/bun.lock index 7a9f4e0bfc..f164022eff 100644 --- a/bun.lock +++ b/bun.lock @@ -18,7 +18,7 @@ }, "apps/admin": { "name": "packrat-admin-app", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "@packrat/web-ui": "workspace:*", "@radix-ui/react-alert-dialog": "catalog:", @@ -58,7 +58,7 @@ }, "apps/expo": { "name": "packrat-expo-app", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "@ai-sdk/react": "^2.0.11", "@expo/react-native-action-sheet": "^4.1.1", @@ -175,7 +175,7 @@ }, "apps/guides": { "name": "packrat-guides-app", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "@ai-sdk/openai": "^2.0.11", "@hookform/resolvers": "^3.10.0", @@ -258,7 +258,7 @@ }, "apps/landing": { "name": "packrat-landing-app", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "@emotion/is-prop-valid": "^1.3.1", "@hookform/resolvers": "^3.10.0", @@ -324,7 +324,7 @@ }, "packages/analytics": { "name": "@packrat/analytics", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "@duckdb/node-api": "1.5.0-r.1", "consola": "^3.4.2", @@ -391,7 +391,7 @@ }, "packages/cli": { "name": "@packrat/cli", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "@duckdb/node-api": "1.5.0-r.1", "@packrat/analytics": "workspace:*", @@ -406,21 +406,21 @@ }, "packages/guards": { "name": "@packrat/guards", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "radash": "catalog:", }, }, "packages/ui": { "name": "@packrat/ui", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "@packrat-ai/nativewindui": "^2.0.2", }, }, "packages/web-ui": { "name": "@packrat/web-ui", - "version": "2.0.18", + "version": "2.0.19", "dependencies": { "@radix-ui/react-accordion": "catalog:", "@radix-ui/react-alert-dialog": "catalog:",