Skip to content

Ft v2 #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ yarn-error.log
graphql-types.ts

# Auto-generated by gatsby-plugin-extract-schema
schema.graphql
schema.graphql


.bin/*

2 changes: 1 addition & 1 deletion config/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "@TenKBay",
"siteUrl": "https://tenkbay.com",
"contractName": "v2.tenk.testnet",
"contractName": "nft.cheddar.testnet",
"social": [
{
"href": "https://discord.com/invite/UY9Xf2k",
Expand Down
144 changes: 72 additions & 72 deletions lib/locales/Locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,76 +7,76 @@
/**
* Commonmark-formatted markdown. @see https://remarkjs.github.io/react-markdown/
*/
type Markdown = string
type Markdown = string

// TODO: should be able to import Action from ./runtimeUtils, but currently breaks with typescript-json-validator
// import type { Action } from './runtimeUtils'
type Action = "ADD_TO_CALENDAR(SALE_START)" | "ADD_TO_CALENDAR(PRESALE_START)" | "SIGN_IN" | "MINT" | "GO_TO_PARAS"

export const requiredHeroFields = [
'title',
'body',
'cta',
'action',
'remaining',
] as const

export const optionalHeroFields = [
'backgroundImage',
'backgroundColor',
'image',
'video',
'ps',
'setNumber',
] as const

export type Hero = {
[K in typeof requiredHeroFields[number]]: K extends 'action' ? Action : Markdown
} & {
[K in typeof optionalHeroFields[number]]?: string
}

export const userStatuses = ['signedOut', 'signedIn', 'vip'] as const

type HeroSaleStatus = Partial<Hero> & {
[K in typeof userStatuses[number]]?: Partial<Hero>
}

export const saleStatuses = ['saleClosed', 'presale', 'saleOpen', 'allSold'] as const

export type RawHeroTree = Partial<Hero> & {
[K in typeof saleStatuses[number]]?: HeroSaleStatus
}

export interface SectionI18n {
text: Markdown
image?: string
video?: string
backgroundImage?: string
backgroundColor?: string
className?: string
blocks?: {
image?: string
text?: string
linkTo?: string
}[]
}

export interface Locale {
viewIn: string
langPicker: string
title: string
description: string
calendarEvent: string
connectWallet: string
signOut: string
new: string
myNFTs: string
nextNFT: string
prevNFT: string
close: string
zoomIn: string
zoomOut: string
hero: RawHeroTree
extraSections?: SectionI18n[]
}
// TODO: should be able to import Action from ./runtimeUtils, but currently breaks with typescript-json-validator
// import type { Action } from './runtimeUtils'
type Action = "ADD_TO_CALENDAR(SALE_START)" | "ADD_TO_CALENDAR(PRESALE_START)" | "SIGN_IN" | "MINT" | "GO_TO_PARAS"
export const requiredHeroFields = [
'title',
'body',
'cta',
'action',
'remaining',
] as const
export const optionalHeroFields = [
'backgroundImage',
'backgroundColor',
'image',
'video',
'ps',
'setNumber',
] as const
export type Hero = {
[K in typeof requiredHeroFields[number]]: K extends 'action' ? Action : Markdown
} & {
[K in typeof optionalHeroFields[number]]?: string
}
export const userStatuses = ['signedOut', 'signedIn', 'vip'] as const
type HeroSaleStatus = Partial<Hero> & {
[K in typeof userStatuses[number]]?: Partial<Hero>
}
export const saleStatuses = ['saleClosed', 'presale', 'saleOpen', 'allSold'] as const
export type RawHeroTree = Partial<Hero> & {
[K in typeof saleStatuses[number]]?: HeroSaleStatus
}
export interface SectionI18n {
text: Markdown
image?: string
video?: string
backgroundImage?: string
backgroundColor?: string
className?: string
blocks?: {
image?: string
text?: string
linkTo?: string
}[]
}
export interface Locale {
viewIn: string
langPicker: string
title: string
description: string
calendarEvent: string
connectWallet: string
signOut: string
new: string
myNFTs: string
nextNFT: string
prevNFT: string
close: string
zoomIn: string
zoomOut: string
hero: RawHeroTree
extraSections?: SectionI18n[]
}
Loading