@@ -3,7 +3,8 @@ import { useRouter } from "next/router";
33import React , { useState } from "react" ;
44import { useSWRConfig } from "swr/_internal" ;
55
6- import { BASE_URL } from "@/components/ui/backend/organization_call_backend" ;
6+ // PENDING
7+ import { BASE_INVENTORY_URL } from "@/components/ui/backend/organization_call_backend" ;
78// import { createItem } from '../hooks/organization_call_backend';
89import {
910 createMemberClean ,
@@ -95,17 +96,17 @@ const Organization_Add_Member = () => {
9596 await createMemberClean ( { ...formData } as Member_Details_Interface ) ;
9697
9798 // 3. Tell SWR to refresh the Dashboard data
98- // This tells SWR: "The data at BASE_URL is old, please go get the new list!"
99- mutate ( [ `${ BASE_URL } ` , "all" ] ) ;
99+ // This tells SWR: "The data at BASE_INVENTORY_URL is old, please go get the new list!"
100+ mutate ( [ `${ BASE_INVENTORY_URL } ` , "all" ] ) ;
100101
101102 alert ( "Member created!" ) ;
102103 } else {
103104 // 2. Call the action (The "Messenger")
104105 await updateMemberClean ( formData ) ;
105106
106107 // 3. Tell SWR to refresh the Dashboard data
107- // This tells SWR: "The data at BASE_URL is old, please go get the new list!"
108- mutate ( [ `${ BASE_URL } ` , "all" ] ) ;
108+ // This tells SWR: "The data at BASE_INVENTORY_URL is old, please go get the new list!"
109+ mutate ( [ `${ BASE_INVENTORY_URL } ` , "all" ] ) ;
109110
110111 alert ( "Member updated!" ) ;
111112 }
0 commit comments