feat: refactor party event action types and functions, update imports and naming conventions to use PartyEvent naming scheme, add createPartyUser function to party-user actions
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// src/actions/product.ts
|
||||
// src/actions/party-event.ts
|
||||
//
|
||||
import { useMemo } from 'react';
|
||||
import axiosInstance, { endpoints, fetcher } from 'src/lib/axios';
|
||||
@@ -74,6 +74,7 @@ type SearchResultsData = {
|
||||
results: IPartyEventItem[];
|
||||
};
|
||||
|
||||
// TODO: update useSearchPartyEvents
|
||||
export function useSearchProducts(query: string) {
|
||||
const url = query ? [endpoints.product.search, { params: { query } }] : '';
|
||||
|
||||
@@ -135,7 +136,6 @@ export async function updatePartyEvent(partyEventData: Partial<IPartyEventItem>)
|
||||
/**
|
||||
* Work in local
|
||||
*/
|
||||
|
||||
mutate(
|
||||
endpoints.partyEvent.list,
|
||||
(currentData: any) => {
|
||||
@@ -163,7 +163,6 @@ export async function deletePartyEvent(partyEventId: string) {
|
||||
/**
|
||||
* Work in local
|
||||
*/
|
||||
|
||||
mutate(
|
||||
endpoints.partyEvent.list,
|
||||
(currentData: any) => {
|
||||
|
Reference in New Issue
Block a user