Skip to content

Commit

Permalink
:qa
Browse files Browse the repository at this point in the history
qa
Merge branch 'sero-nitegeist/guild-players-linktree' of github.com:MetaFam/TheGame into sero-nitegeist/guild-players-linktree
  • Loading branch information
Seroxdesign committed Oct 9, 2023
2 parents 4684acc + 95d8b0b commit 77e00ab
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ FRONTEND_URL=http://localhost:3000

# packages/backend
IMGIX_TOKEN=
# GITHUB_API_TOKEN= # IMPORTANT! create one at https://github.com/settings/tokens
# GITHUB_API_TOKEN= # In order to seed a local database with player data, you will need to create one at https://github.com/settings/tokens
3 changes: 3 additions & 0 deletions packages/backend/src/handlers/actions/routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import express from 'express';

import { asyncHandlerWrapper } from '../../lib/apiHelpers.js';
import { routes as composeDBRoutes } from './composeDB/routes.js';
import { guildRoutes } from './guild/routes.js';
import { syncAllGuildDiscordMembers } from './guild/sync.js';
import syncBalances from './player/syncBalances.js';
Expand All @@ -23,3 +24,5 @@ actionRoutes.post(
actionRoutes.use('/quests', questsRoutes);

actionRoutes.use('/guild', guildRoutes);

actionRoutes.use('/composeDB', composeDBRoutes);
6 changes: 5 additions & 1 deletion packages/backend/src/handlers/actions/sourcecred/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export const syncSourceCredAccounts = async (
const { error: loadError } = await ledgerManager.reloadLedger();

if (loadError) {
throw new Error(`Unable to load ledger: ${loadError}`);
throw new Error(
`Unable to load ledger: ${loadError}.\n` +
'Make sure you have a valid GITHUB_API_TOKEN set in your .env ' +
'that has access to https://github.com/MetaFam/XP. See guides/BACKEND.md for more info.',
);
}

const force = req.query.force != null;
Expand Down
26 changes: 13 additions & 13 deletions packages/web/components/Player/Profile/ComposeDBPromptModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,6 @@ export const ComposeDBPromptModal: React.FC<ComposeDBPromptModalProps> = ({
siloing it off into tens of other application databases like in
the web2 world.
</Box>
<Box fontStyle="italic" fontSize="large" mt={4} mb={2}>
What data does this include?
</Box>
<Box>
MyMeta's ComposeDB model includes:
<UnorderedList mb={2}>
{Object.values(profileMapping).map((field) => (
<ListItem key={field}>{field}</ListItem>
))}
</UnorderedList>
Note that skills and DAO memberships are currently <em>not</em>{' '}
being stored in ComposeDB.
</Box>
<Box fontStyle="italic" fontSize="large" mt={4} mb={2}>
What control do I have over this data? What's the catch?
</Box>
Expand All @@ -196,6 +183,19 @@ export const ComposeDBPromptModal: React.FC<ComposeDBPromptModalProps> = ({
address you are connected with becomes the sole controller of
that data.
</Box>
<Box fontStyle="italic" fontSize="large" mt={4} mb={2}>
What data does this include?
</Box>
<Box>
MyMeta's ComposeDB model includes:
<UnorderedList mb={2}>
{Object.values(profileMapping).map((field) => (
<ListItem key={field}>{field}</ListItem>
))}
</UnorderedList>
Note that skills and DAO memberships are currently <em>not</em>{' '}
being stored in ComposeDB.
</Box>
</Box>
</Center>
</ModalBody>
Expand Down
6 changes: 1 addition & 5 deletions packages/web/components/Setup/SetupAvailability.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const SetupAvailabilityInput: React.FC = () => {
formState: { errors },
} = useFormContext();

const { ref: registerRef, ...props } = register(field, {
const { ...props } = register(field, {
valueAsNumber: true,
min: {
value: 0,
Expand Down Expand Up @@ -103,10 +103,6 @@ const SetupAvailabilityInput: React.FC = () => {
borderRight={0}
_focus={errors[field] ? { borderColor: 'red' } : undefined}
autoFocus
ref={(ref) => {
ref?.focus();
registerRef(ref);
}}
{...props}
/>
<InputRightAddon bg="purpleBoxDark" color="white">
Expand Down
6 changes: 1 addition & 5 deletions packages/web/components/Setup/SetupDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const DescriptionField: React.FC = () => {
formState: { errors },
} = useFormContext();

const { ref: registerRef, ...props } = register(field, {
const { ...props } = register(field, {
maxLength: {
value: 420,
message: 'Maximum length is 420 characters.',
Expand All @@ -74,10 +74,6 @@ const DescriptionField: React.FC = () => {
color="white"
_focus={errors[field] ? { borderColor: 'red' } : undefined}
bg="dark"
ref={(ref) => {
ref?.focus();
registerRef(ref);
}}
{...props}
/>
</Flex>
Expand Down
6 changes: 1 addition & 5 deletions packages/web/components/Setup/SetupName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const SetupNameInput: React.FC = () => {

const { errors } = formState;

const { ref: registerRef, ...props } = register(field, {
const { ...props } = register(field, {
required: 'We have to identify you somehow! 😱',
maxLength: {
value: 150,
Expand All @@ -69,10 +69,6 @@ const SetupNameInput: React.FC = () => {
placeholder="NAME"
w="auto"
_focus={errors[field] ? { borderColor: 'red' } : undefined}
ref={(ref) => {
ref?.focus();
registerRef(ref);
}}
{...props}
/>
</>
Expand Down
1 change: 0 additions & 1 deletion packages/web/components/Setup/SetupProfilePicture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const SetupProfilePictureInput: React.FC<{
name="profileImageURL"
accept="image/*"
ref={(ref) => {
ref?.focus();
registerRef(ref);
inputRef.current = ref;
}}
Expand Down

0 comments on commit 77e00ab

Please sign in to comment.