Skip to content

Commit

Permalink
relocate server actions
Browse files Browse the repository at this point in the history
fix imports
  • Loading branch information
nl32 committed Apr 19, 2024
1 parent 1a82288 commit 142a98c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/utils/actions.ts → src/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/* eslint-disable @typescript-eslint/require-await */

import { isDate } from 'util/types';
import { order, type eventParamsSchema } from './eventFilter';
import { redirect } from 'next/navigation';
import { parse } from 'date-fns';
import EncodeParams from './encodeParams';
import { z } from 'zod';
import { type eventParamsSchema, order } from '@src/utils/eventFilter';
import EncodeParams from '@src/utils/encodeParams';

export async function eventTimeUpdate(
queryParams: eventParamsSchema,
Expand Down
2 changes: 1 addition & 1 deletion src/components/events/DateBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
} from '@radix-ui/react-popover';
import { addDays, subDays } from 'date-fns';
import { type eventParamsSchema } from '@src/utils/eventFilter';
import { eventTimeUpdate } from '@src/utils/actions';
import { useEffect, useRef } from 'react';
import { eventTimeUpdate } from '@src/app/actions';
const DateBrowser = ({ filterState }: { filterState: eventParamsSchema }) => {
const changeTime = eventTimeUpdate.bind(null, filterState);
const { inputProps, dayPickerProps, setSelected } = useInput({
Expand Down
2 changes: 1 addition & 1 deletion src/components/events/EventSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { api } from '@src/trpc/react';
import { type eventParamsSchema, order } from '@src/utils/eventFilter';
import { useEffect, useRef, useState } from 'react';
import { ExpandLess, ExpandMore } from '@src/icons/Icons';
import { eventFilterUpdate } from '@src/utils/actions';
import { eventFilterUpdate } from '@src/app/actions';

export const basicFilters = [
'Upcoming Events',
Expand Down

0 comments on commit 142a98c

Please sign in to comment.