-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: change parameter for DeleteLayout to just use layout name
Remove file extension formatting on layoutName parameter of service repository layer methods in AltinnAppGitRepository. This makes the method more consistent with the other methods and follows layer responsibilities (service layer does not need to know or specify file extension). commit-id:cf35ff23
- Loading branch information
Showing
7 changed files
with
42 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
frontend/packages/ux-editor/src/hooks/queries/usePagesQuery.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
import { useServicesContext } from 'app-shared/contexts/ServicesContext'; | ||
import { QueryKey } from 'app-shared/types/QueryKey'; | ||
|
||
export const usePagesQuery = ({ org, app, layoutSet }): UseQueryResult<Pages> => { | ||
Check failure on line 5 in frontend/packages/ux-editor/src/hooks/queries/usePagesQuery.ts
|
||
const { getPages } = useServicesContext(); | ||
|
||
return useQuery<Pages>({ | ||
queryKey: [QueryKey.Pages, org, app, layoutSet], | ||
queryFn: () => | ||
getPages(org, app, layoutSet).then((pages) => { | ||
return pages; | ||
}), | ||
}); | ||
}; |