File tree Expand file tree Collapse file tree 1 file changed +20
-10
lines changed
app/[locale]/dashboard/[entityType]/[entitySlug] Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,26 @@ export default function OrgDashboardLayout({ children }: DashboardLayoutProps) {
2424 const params = useParams < { entityType : string ; entitySlug : string } > ( ) ;
2525 const { setEntityDetails, entityDetails, userDetails } = useDashboardStore ( ) ;
2626
27- const EntityDetailsQryRes : { data : any ; isLoading : boolean ; error : any } =
28- useQuery ( [ `entity_details_${ params . entityType } ` ] , ( ) =>
29- GraphQL (
30- params . entityType === 'organization' && getOrgDetailsQryDoc ,
31- {
32- [ params . entityType ] : params . entitySlug ,
33- } ,
34- { slug : params . entitySlug }
35- )
36- ) ;
27+ const EntityDetailsQryRes : {
28+ data : any ;
29+ isLoading : boolean ;
30+ error : any ;
31+ refetch : any ;
32+ } = useQuery ( [ `entity_details_${ params . entityType } ` ] , ( ) =>
33+ GraphQL (
34+ params . entityType === 'organization' && getOrgDetailsQryDoc ,
35+ {
36+ [ params . entityType ] : params . entitySlug ,
37+ } ,
38+ { slug : params . entitySlug }
39+ )
40+ ) ;
41+
42+
43+ useEffect ( ( ) => {
44+ EntityDetailsQryRes . refetch ( ) ;
45+ } , [ ] ) ;
46+
3747
3848 useEffect ( ( ) => {
3949 if ( EntityDetailsQryRes . data ) {
You can’t perform that action at this time.
0 commit comments