Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions patchnotes-web/src/api/custom-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ export const customFetch = async <T>(

return { data, status: response.status, headers: response.headers } as T
}

export default customFetch
18 changes: 1 addition & 17 deletions patchnotes-web/src/api/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
useGetWatchlist,
useGetWatchlistTemplates,
getGetWatchlistQueryKey,
setWatchlist,
addToWatchlist,
removeFromWatchlist,
addToWatchlistFromGitHub,
Expand Down Expand Up @@ -264,17 +263,6 @@ export function useWatchlistTemplates() {
})
}

export function useSetWatchlist() {
const queryClient = useQueryClient()

return useMutation({
mutationFn: (packageIds: string[]) => setWatchlist({ packageIds }),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: getGetWatchlistQueryKey() })
},
})
}

export function useAddToWatchlist() {
const queryClient = useQueryClient()

Expand Down Expand Up @@ -384,11 +372,7 @@ export {

// ── Feed Hook ───────────────────────────────────────────────

export type {
FeedResponseDto,
FeedGroupDto,
FeedReleaseDto,
} from './generated/model'
export type { FeedResponseDto, FeedGroupDto } from './generated/model'

interface FeedOptions {
excludePrerelease?: boolean
Expand Down
1 change: 0 additions & 1 deletion patchnotes-web/src/components/auth/index.ts

This file was deleted.

113 changes: 0 additions & 113 deletions patchnotes-web/src/components/releases/ReleaseCard.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion patchnotes-web/src/components/releases/SummaryCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function PackageIcon({ name }: { name: string }) {
)
}

export function PrereleaseTag({ type }: { type?: string }) {
function PrereleaseTag({ type }: { type?: string }) {
if (!type) return null

const colors: Record<string, string> = {
Expand Down
8 changes: 1 addition & 7 deletions patchnotes-web/src/components/releases/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
export { VersionBadge } from './VersionBadge'
export { ReleaseCard } from './ReleaseCard'
export {
SummaryCard,
PackageIcon,
PrereleaseTag,
type SummaryGroup,
} from './SummaryCard'
export { SummaryCard, PackageIcon, type SummaryGroup } from './SummaryCard'
11 changes: 2 additions & 9 deletions patchnotes-web/src/hooks/useGeofencing.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import { useQuery } from '@tanstack/react-query'
import { API_ROOT } from '../api/client'

export interface GeolocationData {
interface GeolocationData {
country_code: string
}

export interface GeofencingState {
isLoading: boolean
isAllowed: boolean | null
error: string | null
data: GeolocationData | null
}

const ALLOWED_COUNTRIES = ['US', 'CA']

async function fetchGeolocation(): Promise<GeolocationData> {
Expand All @@ -28,7 +21,7 @@ async function fetchGeolocation(): Promise<GeolocationData> {
return response.json()
}

export function useGeofencing(): GeofencingState {
export function useGeofencing() {
const { data, isLoading, error } = useQuery({
queryKey: ['geolocation'],
queryFn: fetchGeolocation,
Expand Down