fix: removed unused components
Signed-off-by: Varun Raj <varun@skcript.com>
This commit is contained in:
@@ -56,16 +56,13 @@
|
||||
"next-themes": "^0.3.0",
|
||||
"pg": "^8.12.0",
|
||||
"qs": "^6.13.0",
|
||||
"rc-mentions": "^2.18.0",
|
||||
"react": "^18",
|
||||
"react-calendar-heatmap": "^1.9.0",
|
||||
"react-day-picker": "9.0.8",
|
||||
"react-dom": "^18",
|
||||
"react-grid-gallery": "^1.0.1",
|
||||
"react-hot-toast": "^2.5.1",
|
||||
"react-leaflet": "^4.2.1",
|
||||
"react-mentions": "^4.4.10",
|
||||
"react-photo-album": "^3.0.2",
|
||||
"react-query": "^3.39.3",
|
||||
"recharts": "^2.12.7",
|
||||
"remotion": "4.0.232",
|
||||
|
||||
@@ -9,8 +9,6 @@ import { ArrowRight, TriangleAlert } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { LoginForm } from "../auth/LoginForm";
|
||||
import { useConfig } from "@/contexts/ConfigContext";
|
||||
import { queryClient } from "@/config/rQuery";
|
||||
import { QueryClientProvider } from "react-query";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import { useRouter } from "next/router";
|
||||
import PageLayout from "./PageLayout";
|
||||
@@ -91,18 +89,15 @@ export default function RootLayout({ children }: RootLayoutProps) {
|
||||
|
||||
if (pathname.startsWith("/s/")) {
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<div className="grid max-h-screen min-h-screen w-full">
|
||||
<div className="flex flex-col">{children}</div>
|
||||
<Toaster />
|
||||
</div>
|
||||
</QueryClientProvider>
|
||||
)
|
||||
}
|
||||
if (!user) return <LoginForm onLogin={handleLoginCompletion} />;
|
||||
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<UserContext.Provider value={{
|
||||
...user,
|
||||
updateContext: setUser,
|
||||
@@ -113,6 +108,5 @@ export default function RootLayout({ children }: RootLayoutProps) {
|
||||
<Toaster />
|
||||
</div>
|
||||
</UserContext.Provider>
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
} from "../ui/dropdown-menu";
|
||||
import { Input } from "../ui/input";
|
||||
import { IPersonListFilters } from "@/handlers/api/people.handler";
|
||||
import AssetFilter from "../shared/common/AssetFilter";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select";
|
||||
|
||||
export function PeopleFilters() {
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
import { Combobox } from '@/components/ui/combobox';
|
||||
import { getFilters } from '@/handlers/api/common.handler';
|
||||
import React, { useMemo, useState } from 'react'
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
const fields = [
|
||||
"make",
|
||||
"model",
|
||||
"lensModel",
|
||||
"city",
|
||||
"state",
|
||||
"country",
|
||||
"projectionType",
|
||||
"colorspace",
|
||||
"bitsPerSample",
|
||||
"rating",
|
||||
];
|
||||
|
||||
const formattedFields = fields.map(field => ({
|
||||
label: field.replace(/([A-Z])/g, ' $1').replace(/^./, str => str.toUpperCase()),
|
||||
value: field
|
||||
}));
|
||||
|
||||
|
||||
export default function AssetFilter() {
|
||||
const [selectedField, setSelectedField] = useState<string | null>(null);
|
||||
|
||||
const { data } = useQuery('filters', getFilters)
|
||||
|
||||
|
||||
const options = useMemo(() => {
|
||||
if (!selectedField) return formattedFields;
|
||||
const { filters } = data;
|
||||
|
||||
if (!filters) return formattedFields;
|
||||
const field = filters[selectedField];
|
||||
if (!field) return [];
|
||||
return field.map((value: string) => ({
|
||||
label: value,
|
||||
value
|
||||
}));
|
||||
}, [selectedField, data]);
|
||||
|
||||
return (
|
||||
<Combobox
|
||||
options={options}
|
||||
closeOnSelect={!!selectedField}
|
||||
onSelect={(value) => {
|
||||
if (!selectedField) setSelectedField(value);
|
||||
|
||||
}}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) setSelectedField(null);
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import {
|
||||
QueryClient,
|
||||
} from 'react-query'
|
||||
|
||||
export const queryClient = new QueryClient()
|
||||
Reference in New Issue
Block a user