-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add beets app #10
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
723a799
copy app as is
groninge01 03edc8e
for now filter on frontend-v3
groninge01 aed0c63
update sentry
groninge01 a1164f3
remove
groninge01 795ff53
update for beets
groninge01 b179a7c
updated filters
groninge01 6dcc0b3
move husky to root
groninge01 8f90b68
custom lint-staged for package
groninge01 565ebb9
remove stylelintignore here
groninge01 caf9088
move license to root
groninge01 44fb1c9
update READMEs
groninge01 bacb295
Merge branch 'main' into feat/add-beets-app
groninge01 4b4d655
fix broken lockfile
groninge01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm lint-staged |
File renamed without changes.
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,9 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
extends: ['@repo/eslint-config/next.js'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: true, | ||
}, | ||
} |
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,48 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
.vscode | ||
.idea | ||
|
||
# Sentry Config File | ||
.sentryclirc | ||
|
||
# GrapgQL Codegen | ||
/lib/shared/services/api/generated/ | ||
|
||
# Sentry Config File | ||
.env.sentry-build-plugin |
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,7 @@ | ||
module.exports = { | ||
singleQuote: true, | ||
arrowParens: "avoid", | ||
semi: false, | ||
proseWrap: "always", | ||
printWidth: 100, | ||
} |
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,43 @@ | ||
# Beets frontend V3 | ||
|
||
## Getting Started | ||
|
||
_This project uses `pnpm`, if you haven't already installed it you can find the documentation here: | ||
https://pnpm.io/installation_ | ||
|
||
To setup the development environment, first clone the repo: | ||
|
||
```bash | ||
git clone https://github.com/balancer/frontend-v3.git && cd beets-frontend-v3 | ||
``` | ||
|
||
Copy the `.env.example` file to `.env.local`: | ||
|
||
```bash | ||
cp .env.example .env.local | ||
``` | ||
|
||
Next, install dependencies: | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
Then, run the development server: | ||
|
||
```bash | ||
pnpm dev:beets | ||
``` | ||
|
||
Open [http://localhost:3001](http://localhost:3001) with your browser to see the result. | ||
|
||
## Testing | ||
|
||
See [TESTING.md](./test/TESTING.md). | ||
|
||
## Developing in Windows | ||
|
||
To develop in Windows you need to use WSL2. Learn more about it | ||
[here](https://learn.microsoft.com/en-us/windows/wsl/about). | ||
|
||
With WSL2 all environment variables will be correctly set without having to use `cross-env`. |
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,83 @@ | ||
'use client' | ||
|
||
import { BalAlert } from '@repo/lib/shared/components/alerts/BalAlert' | ||
import { BalAlertButton } from '@repo/lib/shared/components/alerts/BalAlertButton' | ||
import { BalAlertContent } from '@repo/lib/shared/components/alerts/BalAlertContent' | ||
import { useGlobalAlerts } from '@repo/lib/shared/components/alerts/GlobalAlertsProvider' | ||
import { GenericError } from '@repo/lib/shared/components/errors/GenericError' | ||
import { Button, VStack } from '@chakra-ui/react' | ||
|
||
const exceptionName = 'Error fetching swap' | ||
const exceptionMessage = `Execution reverted for an unknown reason. Raw Call Arguments: | ||
to:0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5 | ||
Docs: https://viem.sh/docs/contract/simulateContract Details: execution reverted Version: | ||
viem@2.16.3` | ||
|
||
class TestError extends Error { | ||
constructor(name: string, message: string) { | ||
super(message) | ||
this.name = name | ||
} | ||
} | ||
|
||
export default function Page() { | ||
const { addAlert } = useGlobalAlerts() | ||
return ( | ||
<VStack width="full"> | ||
<BalAlert content={<TitleWithButton title="Info alert" />} status="info" /> | ||
<BalAlert content={<TitleWithButton title="Warning alert" />} status="warning" /> | ||
<BalAlert content={<TitleWithButton title="Error alert" />} status="error" /> | ||
<BalAlert content={<TitleWithButton title="Success alert" />} status="success" /> | ||
<BalAlert | ||
content="Warning alert with close button (soft warning)" | ||
status="warning" | ||
isSoftWarning | ||
/> | ||
<BalAlert | ||
content="Error alert with learn more button link" | ||
learnMoreLink="https://balancer.fi" | ||
status="error" | ||
/> | ||
<BalAlert | ||
content={ | ||
<BalAlertContent | ||
title="Info alert" | ||
description="With description in the next line (forceColumnMode)" | ||
forceColumnMode | ||
></BalAlertContent> | ||
} | ||
status="info" | ||
/> | ||
|
||
<GenericError | ||
error={new TestError(exceptionName, exceptionMessage)} | ||
maxWidth="500" | ||
></GenericError> | ||
|
||
<Button | ||
onClick={() => | ||
addAlert({ | ||
id: 'debugAlert', | ||
title: 'Global warning alert:', | ||
description: 'with global description', | ||
status: 'warning', | ||
}) | ||
} | ||
> | ||
Show global warning alert | ||
</Button> | ||
</VStack> | ||
) | ||
} | ||
|
||
function TitleWithButton({ title }: { title: string }) { | ||
return ( | ||
<BalAlertContent | ||
title={title} | ||
description="Optional description" | ||
tooltipLabel="Optional tooltip" | ||
> | ||
<BalAlertButton onClick={() => console.log('Clicked')}>Click me</BalAlertButton> | ||
</BalAlertContent> | ||
) | ||
} |
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,10 @@ | ||
import { DefaultPageContainer } from '@repo/lib/shared/components/containers/DefaultPageContainer' | ||
import { PropsWithChildren } from 'react' | ||
|
||
export default function DebugLayout({ children }: PropsWithChildren) { | ||
return ( | ||
<DefaultPageContainer width="90%" maxW="90%"> | ||
{children} | ||
</DefaultPageContainer> | ||
) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should prettier config not also be at the root level?