Skip to content

Commit

Permalink
Merge branch 'v3-main' into add-guild-page
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Nov 26, 2024
2 parents dd69324 + ee2f727 commit ca7ba25
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: npm install
run: bun install
- name: Run TypeScript compiler
run: npm run type-check
run: bun run type-check
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
npm run type-check -- --incremental true
bunx lint-staged
bun run type-check -- --incremental true
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ Open source interface for Guild.xyz -- a tool for platformless membership manage

### Running the interface locally

1. `npm i`
2. `npm run dev`
1. `bun i`
2. `bun run dev`
3. If you don't have the secret environment variables, copy the `.env.example` as `.env.local`.

Open [http://localhost:3000](http://localhost:3000) in your browser to see the result.

### Getting secret environment variables (for core team members):

1. Get added to the team on Vercel
1. `npm i vercel@latest -g`
1. `bun i vercel@latest -g`
1. `vercel link`
1. `vercel env pull .env.local`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "next build",
"start": "next start",
"type-check": "tsc --pretty --noEmit --incremental false",
"write-check": "npx @biomejs/biome check --write --unsafe .",
"write-check": "bunx @biomejs/biome check --write --unsafe .",
"storybook": "storybook dev -p 6006 --no-open",
"build-storybook": "storybook build"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const defaultValues = {
imageUrl: "",
urlName: "test",
contact: "",
description: "",
} satisfies CreateGuildForm;

const CreateGuildFormProvider = ({ children }: PropsWithChildren) => {
Expand Down
4 changes: 2 additions & 2 deletions src/app/(dashboard)/explorer/components/GuildCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export const GuildCard: FunctionComponent<{ guild: Guild }> = ({ guild }) => {
<span>
{new Intl.NumberFormat("en", {
notation: "compact",
}).format(12345)}
}).format(guild.memberCount)}
</span>
</Badge>

<Badge>5 groups</Badge>
<Badge>{`${guild.roleCount} roles`}</Badge>
</div>
</Card>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/schemas/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const NameSchema = z
.string()
.max(255, "Maximum name length is 255 characters");

export const ImageUrlSchema = z.string().url().max(255);
export const ImageUrlSchema = z.literal("").or(z.string().url().max(255));

export const LogicSchema = z.enum(["AND", "OR", "ANY_OF"]);

Expand Down

0 comments on commit ca7ba25

Please sign in to comment.