mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 16:33:16 +00:00
chore(places): export only what other files use
The media targets, the rating label, the rating score constants, the rating match and the copy editor types are read inside their own files only, which lint:knip holds.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/** A vote average as the badge on a place's picture shows it: whole stars bare, the rest to one place. */
|
||||
export const ratingLabel = (rating: number): string => (Number.isInteger(rating) ? String(rating) : rating.toFixed(1));
|
||||
const ratingLabel = (rating: number): string => (Number.isInteger(rating) ? String(rating) : rating.toFixed(1));
|
||||
|
||||
/** The badge text of an average, or null when there is no vote to show. */
|
||||
export function ratingBadge(average: number | null | undefined): string | null {
|
||||
|
||||
@@ -17,7 +17,7 @@ export interface MediaTarget {
|
||||
}
|
||||
|
||||
/** Every trip and list of the place that takes an upload from the reader: trips first, they keep any file. */
|
||||
export function mediaTargets(entry: PlacesLibraryEntry | null): MediaTarget[] {
|
||||
function mediaTargets(entry: PlacesLibraryEntry | null): MediaTarget[] {
|
||||
const origins = entry?.origins ?? [];
|
||||
const out: MediaTarget[] = [];
|
||||
for (const o of origins)
|
||||
|
||||
Reference in New Issue
Block a user