feat(pages): add contact page

This commit is contained in:
2025-11-19 22:03:35 +01:00
parent 0b65e17903
commit 10e51b5da4
7 changed files with 230 additions and 7 deletions

View File

@@ -1,12 +1,13 @@
import type { ContactRequest, ContactResponse } from '~/types/api/contact';
import type { MetaResponse } from '~/types/api/meta';
import type { UseApiResponse } from './useApi';
export const useBackend = () => {
const api = useApi();
const getMeta = (): UseApiResponse<MetaResponse> => api.get<MetaResponse>('/meta');
const postContact = (): UseApiResponse<ContactResponse, ContactRequest> =>
api.post<ContactResponse, ContactRequest>('/contact', false);
api.post<ContactResponse, ContactRequest>('/contact', undefined, true);
return { getMeta, postContact };
};