e1898bf259
This commit introduces a new page for users to view their submissions in a structured and paginated table. This allows users to easily track their submission history and access key details. The main changes include: - A new page at `/submissions` to display the submissions list. - A `SubmissionsTable` component to render submission data, including title, country, status, and a link to the submission URL. - Integration of `react-paginate` to handle navigation through large sets of data. - A new `useSubmissions` custom hook using TanStack Query for efficient, paginated data fetching from the API. - Addition of the `currency-symbol-map` dependency to display prices with the correct currency symbol.
16 lines
383 B
TypeScript
16 lines
383 B
TypeScript
import api from "../axios";
|
|
import { API_ENDPOINTS } from "../endpoints";
|
|
|
|
export const flagsService = {
|
|
getCountryFlag: async (countryCode: string) => {
|
|
|
|
try {
|
|
const response = await api.get(API_ENDPOINTS.FLAGS(countryCode));
|
|
return response.data;
|
|
} catch (error) {
|
|
console.error("ERROR caught in Flags Service", error);
|
|
throw error;
|
|
}
|
|
},
|
|
};
|