@rileybathurst/paddle 0.0.37 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/PaddleTicket.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { Link } from "gatsby"
|
|
3
3
|
import { GatsbyImage } from "gatsby-plugin-image"
|
|
4
|
-
import type {
|
|
4
|
+
import type { PaddleTicketTypes } from "./types/ticket-types"
|
|
5
5
|
import { PaddleTime } from "./PaddleTime"
|
|
6
6
|
|
|
7
|
-
export function PaddleTicket({ ogimage, slug, name, start, finish, duration, timeframe, fitness, excerpt, price, peek }:
|
|
7
|
+
export function PaddleTicket({ ogimage, slug, name, start, finish, duration, timeframe, fitness, excerpt, price, peek, peek_tours_fall_back, tour_page }: PaddleTicketTypes) {
|
|
8
8
|
|
|
9
9
|
const time = PaddleTime({
|
|
10
10
|
start: start,
|
|
@@ -15,7 +15,7 @@ export function PaddleTicket({ ogimage, slug, name, start, finish, duration, tim
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<section className="ticket">
|
|
18
|
-
<Link to={
|
|
18
|
+
<Link to={`/${tour_page}/${slug}`}>
|
|
19
19
|
<GatsbyImage
|
|
20
20
|
image={ogimage?.localFile?.childImageSharp?.gatsbyImageData}
|
|
21
21
|
alt={`${ogimage?.alternativeText || name} image`}
|
|
@@ -24,7 +24,7 @@ export function PaddleTicket({ ogimage, slug, name, start, finish, duration, tim
|
|
|
24
24
|
/>
|
|
25
25
|
</Link>
|
|
26
26
|
<h4 className="card__title">
|
|
27
|
-
<Link to={
|
|
27
|
+
<Link to={`/${tour_page}/${slug}`}>
|
|
28
28
|
{name}
|
|
29
29
|
</Link>
|
|
30
30
|
</h4>
|
|
@@ -39,7 +39,7 @@ export function PaddleTicket({ ogimage, slug, name, start, finish, duration, tim
|
|
|
39
39
|
<div className="card__details">
|
|
40
40
|
<h5>${price}</h5>
|
|
41
41
|
<a
|
|
42
|
-
href={peek}
|
|
42
|
+
href={peek ? peek : peek_tours_fall_back}
|
|
43
43
|
target="_blank"
|
|
44
44
|
rel="noopener noreferrer"
|
|
45
45
|
className="book-now"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IGatsbyImageData } from "gatsby-plugin-image";
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface PaddleTicketTypes {
|
|
4
4
|
id: React.Key;
|
|
5
5
|
ogimage: {
|
|
6
6
|
localFile: { childImageSharp: { gatsbyImageData: IGatsbyImageData } };
|
|
@@ -16,4 +16,7 @@ export interface TicketTypes {
|
|
|
16
16
|
excerpt: string;
|
|
17
17
|
price: string;
|
|
18
18
|
peek: string;
|
|
19
|
+
|
|
20
|
+
peek_tours_fall_back: string;
|
|
21
|
+
tour_page: string;
|
|
19
22
|
}
|