nielsr HF staff commited on
Commit
51ec36d
·
1 Parent(s): 282a3b2

Remove filter on calendar tab

Browse files
Files changed (1) hide show
  1. src/pages/Calendar.tsx +2 -14
src/pages/Calendar.tsx CHANGED
@@ -6,7 +6,6 @@ import { Calendar } from "@/components/ui/calendar";
6
  import { parseISO, format, isValid, isSameMonth, isSameYear, isSameDay, isSameWeek } from "date-fns";
7
  import { Toggle } from "@/components/ui/toggle";
8
  import Header from "@/components/Header";
9
- import FilterBar from "@/components/FilterBar";
10
  import {
11
  Dialog,
12
  DialogContent,
@@ -46,7 +45,6 @@ const CalendarPage = () => {
46
  const [selectedDate, setSelectedDate] = useState<Date | undefined>(new Date());
47
  const [isYearView, setIsYearView] = useState(true);
48
  const [searchQuery, setSearchQuery] = useState("");
49
- const [selectedTag, setSelectedTag] = useState("All");
50
  const [selectedDayEvents, setSelectedDayEvents] = useState<{ date: Date | null, events: { deadlines: Conference[], conferences: Conference[] } }>({
51
  date: null,
52
  events: { deadlines: [], conferences: [] }
@@ -86,10 +84,7 @@ const CalendarPage = () => {
86
  conf.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
87
  (conf.full_name && conf.full_name.toLowerCase().includes(searchQuery.toLowerCase()));
88
 
89
- const confTags = Array.isArray(conf.tags) ? conf.tags : [];
90
- const matchesTag = selectedTag === "All" || confTags.includes(selectedTag);
91
-
92
- if (!matchesSearch || !matchesTag) return false;
93
 
94
  const deadlineDate = safeParseISO(conf.deadline);
95
  const startDate = safeParseISO(conf.start);
@@ -355,14 +350,7 @@ const CalendarPage = () => {
355
 
356
  return (
357
  <div className="min-h-screen bg-neutral-light">
358
- <Header
359
- onSearch={(query) => {
360
- setSearchQuery(query);
361
- // Reset selected date when searching
362
- setSelectedDate(undefined);
363
- }}
364
- />
365
- <FilterBar selectedTag={selectedTag} onTagSelect={setSelectedTag} />
366
 
367
  {/* Add a search results section when there's a search query */}
368
  {searchQuery && (
 
6
  import { parseISO, format, isValid, isSameMonth, isSameYear, isSameDay, isSameWeek } from "date-fns";
7
  import { Toggle } from "@/components/ui/toggle";
8
  import Header from "@/components/Header";
 
9
  import {
10
  Dialog,
11
  DialogContent,
 
45
  const [selectedDate, setSelectedDate] = useState<Date | undefined>(new Date());
46
  const [isYearView, setIsYearView] = useState(true);
47
  const [searchQuery, setSearchQuery] = useState("");
 
48
  const [selectedDayEvents, setSelectedDayEvents] = useState<{ date: Date | null, events: { deadlines: Conference[], conferences: Conference[] } }>({
49
  date: null,
50
  events: { deadlines: [], conferences: [] }
 
84
  conf.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
85
  (conf.full_name && conf.full_name.toLowerCase().includes(searchQuery.toLowerCase()));
86
 
87
+ if (!matchesSearch) return false;
 
 
 
88
 
89
  const deadlineDate = safeParseISO(conf.deadline);
90
  const startDate = safeParseISO(conf.start);
 
350
 
351
  return (
352
  <div className="min-h-screen bg-neutral-light">
353
+ <Header onSearch={setSearchQuery} />
 
 
 
 
 
 
 
354
 
355
  {/* Add a search results section when there's a search query */}
356
  {searchQuery && (