Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
hicetnunc2000 committed Nov 10, 2021
2 parents 37c4562 + bbd7038 commit 2fc8560
Show file tree
Hide file tree
Showing 45 changed files with 6,563 additions and 37,353 deletions.
Binary file added 1636259527044.zip
Binary file not shown.
43,831 changes: 6,515 additions & 37,316 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/components/input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const Input = ({
onWheel = () => null,
disabled,
value,
pattern
pattern,
onKeyPress
}) => (
<div className={styles.container}>
<label>
Expand All @@ -28,9 +29,9 @@ export const Input = ({
defaultValue={value}
onChange={onChange}
onBlur={onBlur}
disabled={disabled}
pattern={pattern}
onWheel={onWheel}
onKeyPress={onKeyPress}
/>
<p>{label}</p>
</label>
Expand Down
5 changes: 0 additions & 5 deletions src/components/item-info/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ export const ItemInfo = ({
<div className={styles.edition}>
<div className={styles.inline}>
{/* <p className={styles.issuer}>{isCollab ? 'Collaboration:' : 'Issuer:'}&nbsp;</p> */}
{isCollab && (
<CollabIssuerInfo address={ creatorAddress } />
)}
{!isCollab && (
<Button
to={
`/tz/${creator.address}`
Expand All @@ -118,7 +114,6 @@ export const ItemInfo = ({
<Primary>{walletPreview(creator.address)}</Primary>
)}
</Button>
)}
</div>
{!feed && (
<div>
Expand Down
56 changes: 39 additions & 17 deletions src/pages/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ async function fetchSubjkts(subjkt) {
//console.log(subjkt)
const { errors, data } = await fetchGraphQL(`
query subjktsQuery {
hic_et_nunc_holder(where: { name: {_like: "%${subjkt}%"}}, order_by: {hdao_balance: desc}) {
hic_et_nunc_holder(where: { name: {_ilike: "%${subjkt}%"}}, order_by: {hdao_balance: desc}) {
address
name
hdao_balance
Expand Down Expand Up @@ -540,7 +540,8 @@ export class Search extends Component {
{ id: 7, value: 'recent sales' },
{ id: 8, value: '1D' },
{ id: 9, value: '1W' },
{ id: 10, value: '1M' }
{ id: 10, value: '1M' },
{ id: 11, value: 'ATH' }
],
select: [],
mouse: false,
Expand All @@ -561,7 +562,7 @@ export class Search extends Component {
handleChange = (e) => {
this.setState({ [e.target.name]: e.target.value })

if (this.state.search.length >= 1) this.search()
//if (this.state.search.length >= 1) this.search()
}

update = async (e, reset) => {
Expand All @@ -579,6 +580,7 @@ export class Search extends Component {
let list = await fetchDay(new Date((new Date()).getTime() - 60 * 60 * 24 * 1000).toISOString(), this.state.offset)
list = list.map(e => e.token)
list = [...this.state.feed, ...(list)]
list = list.filter(e => !arr.includes(e.creator.address))
list = _.uniqBy(list, 'id')

this.setState({
Expand All @@ -590,6 +592,8 @@ export class Search extends Component {
let list = await fetchDay(new Date((new Date()).getTime() - 60 * 60 * 24 * 7 * 1000).toISOString(), this.state.offset)
list = list.map(e => e.token)
list = [...this.state.feed, ...(list)]
list = list.filter(e => !arr.includes(e.creator.address))

list = _.uniqBy(list, 'id')

this.setState({
Expand All @@ -602,13 +606,26 @@ export class Search extends Component {
let list = await fetchDay(new Date((new Date()).getTime() - 60 * 60 * 24 * 30 * 1000).toISOString(), this.state.offset)
list = list.map(e => e.token)
list = [...this.state.feed, ...(list)]
list = list.filter(e => !arr.includes(e.creator.address))

list = _.uniqBy(list, 'id')

this.setState({
feed: list
})
}

if (e === 'ATH') {
let list = await fetchDay(new Date('2021-05-01').toISOString(), this.state.offset)
list = list.map(e => e.token)
list = [...this.state.feed, ...(list)]
list = _.uniqBy(list, 'id')
console.log('ath', list)
this.setState({
feed: list
})
}

if (e === 'num') {
let res = await fetchFeed(Number(this.state.search) + 1 - this.state.offset)
res = res.filter(e => !arr.includes(e.creator_id))
Expand Down Expand Up @@ -693,24 +710,25 @@ export class Search extends Component {
let restricted = await getRestrictedAddresses()
result = _.uniqBy([...this.state.feed, ...result], 'creator_id')
result = result.filter(e => !restricted.includes(e.creator_id))
this.setState({ feed: [...result], flag : true })
this.setState({ feed: [...result], flag: true })
}


search = async (e) => {

console.log(e)

this.setState({ items: [], feed: [], search: e })
this.setState({ subjkt: await fetchSubjkts(this.state.search) })

if ((this.state.subjkt[0]?.hdao_balance > 30000000) || (isFloat(Number(this.state.search)))) {
console.log(isFloat(Number(this.state.search)))
this.setState({ feed: await fetchCreations(this.state.subjkt[0].address, this.state.offset), select: 'creations' })
} else if (!isNaN(this.state.search)) {
if (!isNaN(this.state.search)) {
this.setState({ feed: await fetchFeed(Number(this.state.search) + 1), select: 'num' })
} else {
this.setState({ feed: _.uniqBy(await fetchTag(this.state.search.toLowerCase(), 9999999), 'creator_id'), select: 'tag' })
}


console.log(this.state.feed)
}

hoverState = (bool) => this.setState({ mouse: bool })
Expand All @@ -722,21 +740,25 @@ export class Search extends Component {
this.update(this.state.select, false)
}

handleKey = (e) => {
console.log(this.state.search)
if (e.key == 'Enter') this.search(this.state.search)
}

render() {

return (
<Page>
<Container>
<Padding>
<Input
type="text"
name="search"
onMouseEnter={() => this.hoverState(true)}
onMouseLeave={() => this.hoverState(false)}
onChange={e => this.search(e.target.value)}
label="objkt id, artists, tags"
placeholder="objkt id, artists, tags"
/>
<Input
type="text"
name="search"
onChange={this.handleChange}
label="search ↵"
placeholder="search ↵"
onKeyPress={this.handleKey}
/>
{
<div style={{ marginTop: '15px' }}>
{this.state.tags.map(e => <a className='tag' href='#' onClick={() => {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/search/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
margin-bottom: 6px;
font-size: 16px;
font-weight: bold;
}
}

Binary file added src/styles/IBMPlexMono-Bold.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-BoldItalic.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-ExtraLight.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-ExtraLightItalic.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-Italic.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-Light.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-LightItalic.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-Medium.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-MediumItalic.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-Regular.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-SemiBold.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-SemiBoldItalic.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-Thin.ttf
Binary file not shown.
Binary file added src/styles/IBMPlexMono-ThinItalic.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-Bold.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-BoldItalic.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-ExtraLight.ttf
Binary file not shown.
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-Italic.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-Light.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-LightItalic.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-Medium.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-MediumItalic.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-Regular.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-SemiBold.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-SemiBoldItalic.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-Thin.ttf
Binary file not shown.
Binary file added src/styles/fonts/IBMPlexMono-ThinItalic.ttf
Binary file not shown.
Binary file removed src/styles/fonts/OCR-A-Std-Regular.eot
Binary file not shown.
Empty file.
Binary file removed src/styles/fonts/OCR-A-Std-Regular.ttf
Binary file not shown.
Binary file removed src/styles/fonts/OCR-A-Std-Regular.woff
Binary file not shown.
Binary file removed src/styles/fonts/OCR-A-Std-Regular.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ html {
body {
margin: 0;
padding: 0;
font-family: 'basier_circle_monoregular', 'Courier New', 'Courier', monospace;
font-family: 'IBM Plex Mono', 'Courier New', 'Courier', monospace;
// font-family: 'OCR A Std', monospace; // README: crzypatchwork, this font doesn't look great.
// font-family: 'Courier New', 'Courier', monospace; // README: old font
overflow-x: hidden;
Expand All @@ -28,7 +28,7 @@ body {
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
font-family: 'basier_circle_monoregular', 'Courier New', 'Courier', monospace;
font-family: 'IBM Plex Mono', 'Courier New', 'Courier', monospace;
// font-family: 'OCR A Std', monospace;// README: crzypatchwork, this font doesn't look great.
// font-family: 'Courier New', 'Courier', monospace;// README: oldfont
}
12 changes: 2 additions & 10 deletions src/styles/typography.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
@font-face {
font-family: 'basier_circle_monoregular';
src: url('fonts/basiercirclemono-regular-webfont.eot');
src: url('fonts/basiercirclemono-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/basiercirclemono-regular-webfont.woff2') format('woff2'),
url('fonts/basiercirclemono-regular-webfont.woff') format('woff'),
url('fonts/basiercirclemono-regular-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
//@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans+Thai&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400&display=swap');

0 comments on commit 2fc8560

Please sign in to comment.