Skip to content

Commit

Permalink
fix: 🐛 build
Browse files Browse the repository at this point in the history
the config probably need a bit of cleaning at some point.
There is a misconfiguration between ts, vite and eslint
  • Loading branch information
melMass committed Mar 13, 2023
1 parent bc588e9 commit d6f65d5
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/atoms/input/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styles from '@style'
import classNames from 'classnames'
import React, { useCallback } from 'react'

import './types'
import './types.d.ts'

const Checkbox = (
{
Expand Down
2 changes: 1 addition & 1 deletion src/context/mintStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
import type { FileForm } from '@types'
import { prepareFilesFromZIP } from '@utils/html'
import { prepareDirectory, prepareFile } from '@data/ipfs'
import '@atoms/select/types'
import '@atoms/select/types.d.ts'

interface MintState {
title?: string
Expand Down
10 changes: 9 additions & 1 deletion src/pages/home/feeds/fund-feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ function FundFeed({
contractAddress,
cause,
namepsace,
tags = null,
tags,
}: {
minShares?: number
introText: string
infoUrl: string
contractAddress: string
cause: string
namepsace: string
tags?: string[]
}) {
return (
<>
Expand Down
17 changes: 14 additions & 3 deletions src/pages/home/feeds/mime-type-feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,31 @@ import uniqBy from 'lodash/uniqBy'
import { BaseTokenFieldsFragment } from '@data/queries'
import { HEN_CONTRACT_FA2 } from '@constants'
import TokenCollection from '@atoms/token-collection'
import type { Token_Metadata } from 'gql'

function MimeTypeFeed({ label, namespace, mimeTypes }) {
function MimeTypeFeed({
label,
namespace,
mimeTypes,
}: {
label: string
namespace: string
mimeTypes: string[]
}) {
return (
<TokenCollection
feeds_menu
label={label}
namespace={namespace}
maxItems={600}
postProcessTokens={(tokens) => uniqBy(tokens, 'artist_address')}
postProcessTokens={(tokens: Token_Metadata[]) =>
uniqBy(tokens, 'artist_address')
}
query={gql`
${BaseTokenFieldsFragment}
query getTokensByMimeTypes($limit: Int!) {
tokens(where: { mime_type: {_in : [${mimeTypes
.map((mimeType) => `"${mimeType}"`)
.map((mimeType: string) => `"${mimeType}"`)
.join(
', '
)}] }, editions : { _neq : 0 }, metadata_status: { _eq: "processed" }, fa2_address: { _eq: "${HEN_CONTRACT_FA2}"}}, order_by: { minted_at: desc }, limit: $limit) {
Expand Down
5 changes: 4 additions & 1 deletion src/pages/home/feeds/new-objkts-feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import uniqBy from 'lodash/uniqBy'
import { BaseTokenFieldsFragment } from '@data/queries'
import { HEN_CONTRACT_FA2 } from '@constants'
import TokenCollection from '@atoms/token-collection'
import type { Token_Metadata } from 'gql'

export function NewObjktsFeed() {
return (
Expand All @@ -11,7 +12,9 @@ export function NewObjktsFeed() {
label="New OBJKTs"
namespace="new-objkts-feed"
maxItems={600}
postProcessTokens={(tokens) => uniqBy(tokens, 'artist_address')}
postProcessTokens={(tokens: Token_Metadata[]) =>
uniqBy(tokens, 'artist_address')
}
query={gql`
${BaseTokenFieldsFragment}
query getNewObjkt($limit: Int!) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { gql } from 'graphql-request'
import uniqBy from 'lodash/uniqBy'
import { BaseTokenFieldsFragment } from '@data/api'

import { HEN_CONTRACT_FA2 } from '@constants'
import TokenCollection from '@atoms/token-collection'
import { BaseTokenFieldsFragment } from '@data/queries'
import type { Token_Metadata } from 'gql'

export function OneOnOneFeed() {
return (
Expand All @@ -11,7 +13,9 @@ export function OneOnOneFeed() {
label="1/1 OBJKTs"
namespace="one-on-one-feed"
maxItems={600}
postProcessTokens={(tokens) => uniqBy(tokens, 'artist_address')}
postProcessTokens={(tokens: Token_Metadata[]) =>
uniqBy(tokens, 'artist_address')
}
query={gql`
${BaseTokenFieldsFragment}
query getUnoUno($limit: Int!) {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/home/feeds/recent-sales-feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import uniqBy from 'lodash/uniqBy'
import TokenCollection from '@atoms/token-collection'
import { BaseTokenFieldsFragment } from '@data/queries'
import { HEN_CONTRACT_FA2 } from '@constants'
import type { Token_Metadata } from 'gql'

export function RecentSalesFeed() {
return (
Expand All @@ -14,7 +15,7 @@ export function RecentSalesFeed() {
tokenPath="token"
keyPath="token.token_id"
maxItems={600}
postProcessTokens={(tokens) =>
postProcessTokens={(tokens: Token_Metadata[]) =>
uniqBy(uniqBy(tokens, 'token_id'), 'artist_address')
}
query={gql`
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/feeds/search-feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function SearchFeed() {

return (
<TagFeed
feeds_menu={false}
label="Search"
feeds_menu={false}
namespace="search-feed"
tag={searchTerm}
/>
Expand Down
11 changes: 10 additions & 1 deletion src/pages/home/feeds/tag-feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ import TokenCollection from '@atoms/token-collection'
import { BaseTokenFieldsFragment } from '@data/queries'
import { HEN_CONTRACT_FA2 } from '@constants'

export function TagFeed({ tag, ...otherProps }) {
export function TagFeed({
tag,
...otherProps
}: {
tag: string
label?: string
feeds_menu?: boolean
namespace?: string
[key: string]: unknown
}) {
return (
<TokenCollection
feeds_menu
Expand Down

0 comments on commit d6f65d5

Please sign in to comment.