initial commit

This commit is contained in:
Sone
2026-05-19 18:46:16 +02:00
parent a92d70ca74
commit 7e67fa8ea0
33 changed files with 6316 additions and 3952 deletions
+5 -5
View File
@@ -2,9 +2,9 @@ import { useEffect, useState, useCallback, useMemo } from "react";
import { View, Text, FlatList } from "react-native";
import { useLocalSearchParams, router } from "expo-router";
import { ActivityIndicator } from "react-native-paper";
import { useAppSelector } from "@/store/hooks";
import { selectIsMobile } from "@/store/screen/screenSizeSlice";
import { SearchResult, useGlobalSearchQuery } from "@/store/api/searchApi";
import { SearchBar } from "@/components/ui/SearchBar";
import { SizeEnum } from "@/constants/sizeEnum";
@@ -31,7 +31,7 @@ const SearchPage = () => {
skip: !debouncedQ || debouncedQ.trim().length < 2,
refetchOnMountOrArgChange: true,
refetchOnFocus: true,
}
},
);
const results = useMemo(() => data?.results ?? [], [data?.results]);
@@ -42,7 +42,7 @@ const SearchPage = () => {
}, []);
const isExpanded = useCallback(
(id: string) => !!expandedIds[id],
[expandedIds]
[expandedIds],
);
// Reset expansions when new query results arrive
@@ -68,7 +68,7 @@ const SearchPage = () => {
? new Date(item.createdAt).toLocaleString()
: null,
})),
[results]
[results],
);
const renderResult = useCallback(
@@ -79,7 +79,7 @@ const SearchPage = () => {
onToggle={toggleExpanded}
/>
),
[isExpanded, toggleExpanded]
[isExpanded, toggleExpanded],
);
return (
+25 -3
View File
@@ -1,3 +1,25 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/utilities.css";
@import "nativewind/theme";
@theme {
--font-inter: "Inter", sans-serif;
--color-primaryPurple: #49385d;
--color-primaryPurpleLight: #a78fa1;
--color-primaryPurpleDark: #6750a4;
--color-darkGray: #49454f;
--color-darkMediumGray: #7a757c;
--color-mediumGray: #c4bebe;
--color-lightGray: #d9d9d9;
--color-secondary: #b768ff;
--color-tertiary: #2e1155;
--color-accent: #ff00ff;
--color-background: #1e0933;
--color-highRisk: #f83434;
--color-mediumRisk: #f8f834;
--color-lowRisk: #22c927;
--color-orange: #ff9800;
--color-blue: #56b3fa;
}