-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Timeline and contact bubble improvemenets
- Loading branch information
Showing
8 changed files
with
147 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { HOST } from "@/shared/vars" | ||
import { useQuery } from "@tanstack/react-query" | ||
|
||
export interface DatesResponse { | ||
fair: Fair | ||
ticket: Ticket | ||
ir: Ir | ||
fr: Fr | ||
} | ||
|
||
export interface Fair { | ||
description: string | ||
days: string[] // Dates | ||
} | ||
|
||
export interface Ticket { | ||
end: string // Date - after this date companies will no longer be able to modify their lunch or banquet tickets | ||
} | ||
|
||
export interface Ir { | ||
start: string // Date | ||
end: string // Date | ||
acceptance: string // Date - At this date companies will be informed if they got a spot at the fair | ||
} | ||
|
||
export interface Fr { | ||
start: string // Date | ||
end: string // Date | ||
} | ||
|
||
export async function queryDates() { | ||
const response = await fetch(`${HOST}/api/dates`) | ||
const data = await response.json() | ||
return data as DatesResponse | ||
} | ||
|
||
export function useDates() { | ||
return useQuery({ | ||
queryKey: ["dates"], | ||
queryFn: queryDates | ||
}) | ||
} |
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