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
import * as React from "react" | |
interface MessageBasics { | |
other: string; | |
} | |
interface MessageWithlabel { | |
label: string; | |
title?: never | |
} | |
interface MessageWithTitle { | |
label?: never; |
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
const adj: { [key: string]: string } = { | |
wedding: 'special day', | |
residential: 'home', | |
commercial: 'business', | |
'commercial-events': 'business', | |
'social_events': 'event', | |
patio: 'patio' | |
}; | |
const adjective = adj[data.strapiService.slug]; |
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
import * as React from "react" | |
interface BasicTypes { | |
other: string; | |
} | |
interface withLabel extends BasicTypes { | |
label: string; | |
title?: never; | |
} | |
interface withTitle extends BasicTypes { | |
label?: never; |
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
import * as React from "react" | |
import { Link, useStaticQuery, graphql } from 'gatsby'; | |
import { SEO } from "../components/seo"; | |
import Header from "../components/header"; | |
import Footer from "../components/footer"; | |
import Card from "../components/card"; | |
import type { CardType } from "../types/card-type"; |
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
import React from "react"; | |
import { Script, useStaticQuery, graphql } from "gatsby"; | |
interface BreadcrumbsTypes { | |
url: string; | |
[key: number]: { | |
name: string; | |
item: string; | |
}; | |
}[] |
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
import * as React from "react"; | |
interface BreadcrumbTypes { | |
name: string; | |
item: string; | |
} | |
function Breadcrumb(breadcrumbs: BreadcrumbTypes[]) { | |
return ( | |
<> | |
test |
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
<div class="pre-wrap"> | |
<BlocksRenderer content={contact.attributes.postal} /> | |
</div> | |
<style> | |
.pre-wrap { | |
white-space: pre-wrap; | |
} | |
</style> |
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
import qs from "qs"; | |
interface Props { | |
endpoint: string; | |
query?: Record<string, string>; | |
wrappedByKey?: string; | |
wrappedByList?: boolean; | |
// https://docs.strapi.io/dev-docs/api/query-engine/populating | |
populate?: { | |
[key: string]: { |
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
import * as React from "react" | |
interface SpecsTypes { | |
[key: string]: string | number | boolean; | |
} | |
function Specs(keyValuePairs: SpecsTypes) { | |
return ( | |
Object.entries(keyValuePairs).map(([key, value]) => { | |
if (key === 'length' && typeof value === 'number') { |
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
import * as React from "react"; | |
interface tTTypes { | |
start?: string; | |
finish?: string; | |
duration?: number; | |
key?: string | null; | |
unit?: string | null; | |
} | |
const tT = ({ start, finish, duration, key, unit }: tTTypes) => { |
NewerOlder