-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exports for Game7 and OP-Supersim (#4969)
* add exports for Game7 and Supersim * .. * fix types * add lit protocol * update op banner
- Loading branch information
Showing
21 changed files
with
201 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 14 additions & 9 deletions
23
apps/scoutgame/components/claim/components/PointsClaimScreen/BonusPartnersDisplay.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,16 @@ | ||
import { prisma } from '@charmverse/core/prisma-client'; | ||
import { getLastWeek } from '@packages/scoutgame/dates'; | ||
|
||
import { respondWithTSV } from 'lib/nextjs/respondWithTSV'; | ||
import { getBuildersForPartner } from 'lib/partners/getBuildersForPartner'; | ||
|
||
export const dynamic = 'force-dynamic'; | ||
|
||
export async function GET() { | ||
const lastWeek = getLastWeek(); | ||
const events = await prisma.builderEvent.findMany({ | ||
where: { | ||
githubEvent: { | ||
repo: { | ||
bonusPartner: 'celo' | ||
} | ||
}, | ||
type: 'merged_pull_request', | ||
week: lastWeek | ||
}, | ||
orderBy: { | ||
createdAt: 'asc' | ||
}, | ||
select: { | ||
createdAt: true, | ||
builder: { | ||
select: { | ||
email: true, | ||
displayName: true | ||
} | ||
}, | ||
githubEvent: { | ||
select: { | ||
createdAt: true, | ||
url: true, | ||
repo: { | ||
select: { | ||
name: true, | ||
owner: true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
const rows = await getBuildersForPartner({ | ||
week: lastWeek, | ||
bonusPartner: 'celo' | ||
}); | ||
const rows = events.map((event) => ({ | ||
'Farcaster Name': event.builder.displayName, | ||
Email: event.builder.email, | ||
Repo: `${event.githubEvent!.repo.owner}/${event.githubEvent!.repo.name}`, | ||
Date: event.createdAt.toDateString(), | ||
Link: event.githubEvent!.url | ||
})); | ||
|
||
return respondWithTSV(rows, 'scout_users_export.tsv'); | ||
return respondWithTSV(rows, `partners-export_celo_${lastWeek}.tsv`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { getLastWeek } from '@packages/scoutgame/dates'; | ||
|
||
import { respondWithTSV } from 'lib/nextjs/respondWithTSV'; | ||
import { getBuildersForPartner } from 'lib/partners/getBuildersForPartner'; | ||
|
||
export const dynamic = 'force-dynamic'; | ||
|
||
export async function GET() { | ||
const lastWeek = getLastWeek(); | ||
const rows = await getBuildersForPartner({ | ||
week: lastWeek, | ||
bonusPartner: 'game7' | ||
}); | ||
return respondWithTSV(rows, `partners-export_game7_${lastWeek}.tsv`); | ||
} |
16 changes: 16 additions & 0 deletions
16
apps/scoutgameadmin/app/api/partners/lit_protocol/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { getLastWeek } from '@packages/scoutgame/dates'; | ||
|
||
import { respondWithTSV } from 'lib/nextjs/respondWithTSV'; | ||
import { getBuildersForPartner } from 'lib/partners/getBuildersForPartner'; | ||
|
||
export const dynamic = 'force-dynamic'; | ||
|
||
export async function GET() { | ||
const lastWeek = getLastWeek(); | ||
const rows = await getBuildersForPartner({ | ||
week: lastWeek, | ||
bonusPartner: 'lit_protocol' | ||
}); | ||
|
||
return respondWithTSV(rows, `partners-export_lit_${lastWeek}.tsv`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { getLastWeek } from '@packages/scoutgame/dates'; | ||
|
||
import { respondWithTSV } from 'lib/nextjs/respondWithTSV'; | ||
import { getBuildersForPartner } from 'lib/partners/getBuildersForPartner'; | ||
|
||
export const dynamic = 'force-dynamic'; | ||
|
||
export async function GET() { | ||
const lastWeek = getLastWeek(); | ||
const rows = await getBuildersForPartner({ | ||
week: lastWeek, | ||
bonusPartner: 'op_supersim' | ||
}); | ||
|
||
return respondWithTSV(rows, `partners-export_supersim_${lastWeek}.tsv`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
apps/scoutgameadmin/components/common/MenuItemNoAction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { TypographyProps } from '@mui/material'; | ||
import { ListItem, Typography } from '@mui/material'; | ||
|
||
export function MenuItemNoAction({ children, ...props }: { children: React.ReactNode } & TypographyProps) { | ||
return ( | ||
<ListItem dense onClick={(e) => e.stopPropagation()}> | ||
<Typography color='text.secondary' variant='caption' {...props}> | ||
{children} | ||
</Typography> | ||
</ListItem> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.