Skip to content

Commit c304768

Browse files
Merge pull request #698 from hicetnunc2000/develop
Develop
2 parents 6e76fa7 + d4ec91b commit c304768

File tree

14 files changed

+203
-14
lines changed

14 files changed

+203
-14
lines changed

src/components/artist-socials/index.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Button } from '../button'
22
import { VisuallyHidden } from '../visually-hidden'
33
import styles from './styles.module.scss'
44

5-
export const ArtistSocials = ({ site, twitter, instagram, github, reddit }) => {
5+
export const ArtistSocials = ({ site, telegram, twitter, instagram, github, reddit }) => {
66
return (
77
<div className={styles.container}>
88
{site && (
@@ -25,6 +25,25 @@ export const ArtistSocials = ({ site, twitter, instagram, github, reddit }) => {
2525
</svg>
2626
</Button>
2727
)}
28+
{telegram && (
29+
<Button href={`https://t.me/${telegram}`}>
30+
<VisuallyHidden>{`https://t.me/${telegram}`}</VisuallyHidden>
31+
<svg
32+
xmlns="http://www.w3.org/2000/svg"
33+
width="16"
34+
height="16"
35+
fill="currentColor"
36+
viewBox="0 0 16 16"
37+
style={{
38+
fill: 'var(--text-color)',
39+
stroke: 'transparent',
40+
marginRight: '10px',
41+
}}
42+
>
43+
<path d="M9.78,18.65L10.06,14.42L17.74,7.5C18.08,7.19 17.67,7.04 17.22,7.31L7.74,13.3L3.64,12C2.76,11.75 2.75,11.14 3.84,10.7L19.81,4.54C20.54,4.21 21.24,4.72 20.96,5.84L18.24,18.65C18.05,19.56 17.5,19.78 16.74,19.36L12.6,16.3L10.61,18.23C10.38,18.46 10.19,18.65 9.78,18.65Z"></path>
44+
</svg>
45+
</Button>
46+
)}
2847
{twitter && (
2948
<Button href={`https://twitter.com/${twitter}`}>
3049
<VisuallyHidden>{`https://twitter.com/${twitter}`}</VisuallyHidden>

src/components/header/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ export const Header = () => {
146146
<Primary>about</Primary>
147147
</Button>
148148
</li>
149+
<li>
150+
<Button onClick={() => handleRoute('/faq')}>
151+
<Primary>faq</Primary>
152+
</Button>
153+
</li>
149154
</ul>
150155
</nav>
151156
</Padding>

src/components/media-types/html/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export const HTMLComponent = ({
148148
src={`${src}?creator=${_creator_}&viewer=${_viewer_}`}
149149
sandbox="allow-scripts allow-same-origin"
150150
allow="accelerometer; camera; gyroscope; microphone; xr-spatial-tracking;"
151-
scrolling="no"
152151
/>
153152
</div>
154153
)

src/components/media-types/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,19 @@ export const renderMediaType = (props) => {
6161
url = getInfuraUrl(path)
6262
}
6363
let displayUri = ''
64-
if (metadata && metadata.display_uri) {
65-
displayUri = metadata.display_uri.replace('ipfs://', CLOUDFLARE)
64+
// old
65+
if (metadata && metadata.token_info && metadata.token_info.displayUri) {
66+
displayUri = metadata.token_info.displayUri.replace(
67+
'ipfs://',
68+
CLOUDFLARE
69+
)
6670
}
71+
72+
// new
73+
// if (metadata && metadata.display_uri) {
74+
// displayUri = metadata.display_uri.replace('ipfs://', CLOUDFLARE)
75+
// }
76+
6777
return (
6878
<Container interactive={interactive}>
6979
<HTMLComponent

src/components/tags/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ export const Tags = ({ tags }) => {
77
return (
88
<div className={styles.container}>
99
{tags
10-
.filter((e) => e === '')
10+
.filter((e) => e !== '')
1111
.map((tag, index) => {
1212
return (
13-
<Button key={`tag${tag}${index}`} to={`${PATH.TAGS}/${tag}`}>
13+
<Button key={`tag${tag}${index}`} to={`${PATH.TAGS}/${encodeURI(tag)}`}>
1414
<div className={styles.tag}>{tag}</div>
1515
</Button>
1616
)

src/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const PATH = {
1818
FEED: '/',
1919
ISSUER: '/tz',
2020
ABOUT: '/about',
21+
FAQ: '/faq',
2122
SYNC: '/sync',
2223
MINT: '/mint',
2324
OBJKT: '/objkt',

src/pages/display/index.js

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export default class Display extends Component {
6565
if (data.data.description)
6666
this.setState({ description: data.data.description })
6767
if (data.data.site) this.setState({ site: data.data.site })
68+
if (data.data.telegram) this.setState({ telegram: data.data.telegram })
6869
if (data.data.twitter) this.setState({ twitter: data.data.twitter })
6970
if (data.data.github) this.setState({ github: data.data.github })
7071
if (data.data.reddit) this.setState({ reddit: data.data.reddit })
@@ -94,16 +95,21 @@ export default class Display extends Component {
9495

9596
// filter market that were created by the user
9697
Object.keys(res.data.swaps).forEach((e) => {
97-
const id = Number(e)
98+
// all swaps include swaps on OBJKT you purchased and OBJKT you minted.
99+
// setting it to false will only display OBJKT that you purchased and put up for sale
100+
// but will NOT include your own art.
101+
const allSwaps = true
98102

99-
const found = sanitised.find((e) => {
100-
return e.token_id === id
101-
})
102-
103-
// if OBJKT wasn't found on the creations then its a swap of someone
104-
// else OBJKT.
105-
if (!found) {
103+
if (allSwaps) {
106104
market[e] = res.data.swaps[e]
105+
} else {
106+
const id = Number(e)
107+
const found = sanitised.find((e) => {
108+
return e.token_id === id
109+
})
110+
if (!found) {
111+
market[e] = res.data.swaps[e]
112+
}
107113
}
108114
})
109115

@@ -184,6 +190,25 @@ export default class Display extends Component {
184190
</svg>
185191
</Button>
186192
)}
193+
{this.state.telegram && (
194+
<Button href={`https://t.me/${this.state.telegram}`}>
195+
<VisuallyHidden>{`https://t.me/${this.state.telegram}`}</VisuallyHidden>
196+
<svg
197+
xmlns="http://www.w3.org/2000/svg"
198+
width="16"
199+
height="16"
200+
fill="currentColor"
201+
viewBox="0 0 16 16"
202+
style={{
203+
fill: 'var(--text-color)',
204+
stroke: 'transparent',
205+
marginRight: '10px',
206+
}}
207+
>
208+
<path d="M9.78,18.65L10.06,14.42L17.74,7.5C18.08,7.19 17.67,7.04 17.22,7.31L7.74,13.3L3.64,12C2.76,11.75 2.75,11.14 3.84,10.7L19.81,4.54C20.54,4.21 21.24,4.72 20.96,5.84L18.24,18.65C18.05,19.56 17.5,19.78 16.74,19.36L12.6,16.3L10.61,18.23C10.38,18.46 10.19,18.65 9.78,18.65Z"></path>
209+
</svg>
210+
</Button>
211+
)}
187212
{this.state.twitter && (
188213
<Button href={`https://twitter.com/${this.state.twitter}`}>
189214
<VisuallyHidden>{`https://twitter.com/${this.state.twitter}`}</VisuallyHidden>

src/pages/faq/index.js

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import React, { Component } from 'react'
2+
import { Page, Container, Padding } from '../../components/layout'
3+
import { Button, Primary } from '../../components/button'
4+
import { HicetnuncContext } from '../../context/HicetnuncContext'
5+
import styles from './styles.module.scss'
6+
7+
export class FAQ extends Component {
8+
static contextType = HicetnuncContext
9+
10+
state = {
11+
reveal: false,
12+
}
13+
14+
reveal = () => {
15+
this.setState({
16+
reveal: !this.state.reveal,
17+
})
18+
}
19+
20+
render() {
21+
return (
22+
<Page title="faq" large>
23+
<Container>
24+
<Padding>
25+
<div className={styles.buttons}>
26+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/Getting-Started-with-Tezos">
27+
<Primary>
28+
<strong>how do I get tezos/make a wallet?</strong>
29+
</Primary>
30+
</Button>
31+
</div>
32+
<div className={styles.buttons}>
33+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/Introduction">
34+
<Primary>
35+
<strong>how do I mint?</strong>
36+
</Primary>
37+
</Button>
38+
</div>
39+
<div className={styles.buttons}>
40+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/Edit-your-profile">
41+
<Primary>
42+
<strong>how do I edit my profile?</strong>
43+
</Primary>
44+
</Button>
45+
</div>
46+
<div className={styles.buttons}>
47+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/How-to-swap-%F0%9F%94%83">
48+
<Primary>
49+
<strong>how do I add/change the price of my OBJKT?</strong>
50+
</Primary>
51+
</Button>
52+
</div>
53+
<div className={styles.buttons}>
54+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/How-to-burn-%F0%9F%94%A5">
55+
<Primary>
56+
<strong>how do I burn my OBJKT?</strong>
57+
</Primary>
58+
</Button>
59+
</div>
60+
<div className={styles.buttons}>
61+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/How-to-resell-%F0%9F%8F%AA">
62+
<Primary>
63+
<strong>how do I resell an OBJKT?</strong>
64+
</Primary>
65+
</Button>
66+
</div>
67+
<div className={styles.buttons}>
68+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/hDAO">
69+
<Primary>
70+
<strong>what is hDAO ○?</strong>
71+
</Primary>
72+
</Button>
73+
</div>
74+
</Padding>
75+
</Container>
76+
<Container>
77+
<Padding>
78+
<div className={styles.buttons}>
79+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/General">
80+
<Primary>
81+
<strong>general faq</strong>
82+
</Primary>
83+
</Button>
84+
</div>
85+
<div className={styles.buttons}>
86+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/Troubleshooting">
87+
<Primary>
88+
<strong>troubleshooting</strong>
89+
</Primary>
90+
</Button>
91+
</div>
92+
<div className={styles.buttons}>
93+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/Tools-made-by-the-community">
94+
<Primary>
95+
<strong>useful tools</strong>
96+
</Primary>
97+
</Button>
98+
</div>
99+
</Padding>
100+
</Container>
101+
<Container>
102+
<Padding>
103+
<div className={styles.buttons}>
104+
<Button href="https://github.com/hicetnunc2000/hicetnunc/wiki/pt:Home">
105+
<Primary>
106+
<strong>português</strong>
107+
</Primary>
108+
</Button>
109+
</div>
110+
</Padding>
111+
</Container>
112+
</Page>
113+
)
114+
}
115+
}

src/pages/faq/styles.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.buttons {
2+
display: flex;
3+
flex-wrap: wrap;
4+
}

src/pages/gallery-detail/artist-icon/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const ArtistLogo = ({
77
wallet,
88
name,
99
site,
10+
telegram,
1011
twitter,
1112
instagram,
1213
github,
@@ -35,6 +36,7 @@ export const ArtistLogo = ({
3536
)}
3637
<ArtistSocials
3738
site={site}
39+
telegram={telegram}
3840
twitter={twitter}
3941
instagram={instagram}
4042
github={github}

0 commit comments

Comments
 (0)