Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
agnlez committed Aug 7, 2024
1 parent 143c472 commit 71083a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/(static)/events-news/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const prefetchData = async (queryClient: QueryClient) => {
queryKey: queryKeys.events.past.queryKey,
queryFn: async () => {
try {
const response = await fetch(`${APP_HOSTNAME}/events
`);
const response = await fetch(`${APP_HOSTNAME}/events`);
if (!response.ok) {
throw new Error('Failed to fetch past events');
}
Expand All @@ -34,8 +33,7 @@ const prefetchData = async (queryClient: QueryClient) => {
queryKey: queryKeys.events.upcoming.queryKey,
queryFn: async () => {
try {
const response = await fetch(`${APP_HOSTNAME}/events
`);
const response = await fetch(`${APP_HOSTNAME}/events`);
if (!response.ok) {
throw new Error('Failed to fetch upcoming events');
}
Expand Down
6 changes: 6 additions & 0 deletions src/containers/events-news/events/upcoming-events/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ import {
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
import APP_HOSTNAME from '@/lib';
import formatDate from '@/utils/date';

export default function UpcomingEvents() {
const { data } = useQuery<Event[]>({
queryKey: queryKeys.events.upcoming.queryKey,
});

console.log({
APP_HOSTNAME,
final: `${APP_HOSTNAME}/events`,
});

return (
<ul className="">
{data?.map(({ name, image, location, date, description }) => (
Expand Down

0 comments on commit 71083a7

Please sign in to comment.