remove user analytics dos vector

This commit is contained in:
keyan 2023-05-17 17:56:34 -05:00
parent 9d31d56ec0
commit 236dcae13b
4 changed files with 11 additions and 121 deletions

View File

@ -7,7 +7,7 @@ import notifications from './notifications'
import invite from './invite'
import sub from './sub'
import upload from './upload'
import growth from './growth'
// import growth from './growth'
import search from './search'
import rewards from './rewards'
import referrals from './referrals'
@ -15,4 +15,4 @@ import price from './price'
import { GraphQLJSONObject } from 'graphql-type-json'
export default [user, item, message, wallet, lnurl, notifications, invite, sub,
upload, growth, search, rewards, referrals, price, { JSONObject: GraphQLJSONObject }]
upload, search, rewards, referrals, price, { JSONObject: GraphQLJSONObject }]

View File

@ -1,15 +1,15 @@
import { gql } from 'apollo-server-micro'
export default gql`
extend type Query {
registrationGrowth(when: String): [TimeData!]!
itemGrowth(when: String): [TimeData!]!
spendingGrowth(when: String): [TimeData!]!
spenderGrowth(when: String): [TimeData!]!
stackingGrowth(when: String): [TimeData!]!
stackerGrowth(when: String): [TimeData!]!
}
// extend type Query {
// registrationGrowth(when: String): [TimeData!]!
// itemGrowth(when: String): [TimeData!]!
// spendingGrowth(when: String): [TimeData!]!
// spenderGrowth(when: String): [TimeData!]!
// stackingGrowth(when: String): [TimeData!]!
// stackerGrowth(when: String): [TimeData!]!
// }
export default gql`
type NameValue {
name: String!
value: Int!

View File

@ -1,94 +0,0 @@
import { gql } from '@apollo/client'
import { getGetServerSideProps } from '../../api/ssrApollo'
import Layout from '../../components/layout'
import { Col, Row } from 'react-bootstrap'
import { UsageHeader } from '../../components/usage-header'
import { WhenLineChart, WhenAreaChart } from '../../components/when-charts'
export const getServerSideProps = getGetServerSideProps(
gql`
query Growth($when: String!)
{
registrationGrowth(when: $when) {
time
data {
name
value
}
}
itemGrowth(when: $when) {
time
data {
name
value
}
}
spendingGrowth(when: $when) {
time
data {
name
value
}
}
spenderGrowth(when: $when) {
time
data {
name
value
}
}
stackingGrowth(when: $when) {
time
data {
name
value
}
}
stackerGrowth(when: $when) {
time
data {
name
value
}
}
}`)
export default function Growth ({
data: { registrationGrowth, itemGrowth, spendingGrowth, spenderGrowth, stackingGrowth, stackerGrowth }
}) {
return (
<Layout>
<UsageHeader />
<Row>
<Col className='mt-3'>
<div className='text-center text-muted font-weight-bold'>stackers</div>
<WhenLineChart data={stackerGrowth} />
</Col>
<Col className='mt-3'>
<div className='text-center text-muted font-weight-bold'>stacking</div>
<WhenAreaChart data={stackingGrowth} />
</Col>
</Row>
<Row>
<Col className='mt-3'>
<div className='text-center text-muted font-weight-bold'>spenders</div>
<WhenLineChart data={spenderGrowth} />
</Col>
<Col className='mt-3'>
<div className='text-center text-muted font-weight-bold'>spending</div>
<WhenAreaChart data={spendingGrowth} />
</Col>
</Row>
<Row>
<Col className='mt-3'>
<div className='text-center text-muted font-weight-bold'>registrations</div>
<WhenAreaChart data={registrationGrowth} />
</Col>
<Col className='mt-3'>
<div className='text-center text-muted font-weight-bold'>items</div>
<WhenAreaChart data={itemGrowth} />
</Col>
</Row>
</Layout>
)
}

View File

@ -1,16 +0,0 @@
import Layout from '../../components/layout'
import { getGetServerSideProps } from '../../api/ssrApollo'
import { SeoSearch } from '../../components/seo'
import { USER_SEARCH } from '../../fragments/users'
import UserList from '../../components/user-list'
export const getServerSideProps = getGetServerSideProps(USER_SEARCH, { limit: 21, similarity: 0.2 })
export default function Index ({ data: { searchUsers } }) {
return (
<Layout noSeo search>
<SeoSearch />
<UserList users={searchUsers} />
</Layout>
)
}