-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from xmtp/rygine/re-org
Reorganize React app and components
- Loading branch information
Showing
101 changed files
with
322 additions
and
655 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
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 |
---|---|---|
|
@@ -4,5 +4,4 @@ module.exports = { | |
parserOptions: { | ||
project: "./tsconfig.eslint.json", | ||
}, | ||
ignorePatterns: ["lib/**/*"], | ||
}; |
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,27 @@ | ||
# React app | ||
|
||
![Status](https://img.shields.io/badge/Project_Status-Beta-yellow) | ||
|
||
Use this React app as a tool to start building an app with XMTP. This basic messaging app has an intentionally unopinionated UI to help make it easier for you to build with. | ||
|
||
The app is built using the [React XMTP client SDK](/packages/react-sdk/README.md), [React](https://react.dev/), and [RainbowKit](https://www.rainbowkit.com/). | ||
|
||
This app is in **beta** status and ready to serve as a reference for you to start building with. | ||
|
||
However, we do not recommend using beta software in production apps. | ||
|
||
To keep up with the latest React app developments, see the [Issues tab](https://github.com/xmtp/xmtp-web/issues) in this repo. | ||
|
||
To learn more about XMTP and get answers to frequently asked questions, see the [XMTP documentation](https://xmtp.org/docs). | ||
|
||
### Limitations | ||
|
||
This React app isn't a complete solution. For example, the list of conversations doesn't update when new messages arrive in existing conversations. | ||
|
||
## Useful commands | ||
|
||
- `yarn clean`: Removes `node_modules` and `.turbo` folders | ||
- `yarn format`: Runs prettier format and write changes | ||
- `yarn format:check`: Runs prettier format check | ||
- `yarn lint`: Runs ESLint | ||
- `yarn typecheck`: Runs `tsc` |
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,40 @@ | ||
{ | ||
"name": "@xmtp/react-app", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"module": "src/index.ts", | ||
"exports": { | ||
".": "./src/index.ts", | ||
"./styles.css": "./src/styles/index.css" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf .turbo && rm -rf node_modules", | ||
"lint": "eslint . --ignore-path ../../.gitignore", | ||
"format:base": "prettier --ignore-path ../../.gitignore", | ||
"format:check": "yarn format:base -c .", | ||
"format": "yarn format:base -w .", | ||
"typecheck": "tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@heroicons/react": "^2.0.18", | ||
"@rainbow-me/rainbowkit": "^1.3.0", | ||
"@xmtp/content-type-reaction": "^1.1.3", | ||
"@xmtp/content-type-read-receipt": "^1.1.5", | ||
"@xmtp/content-type-remote-attachment": "^1.1.4", | ||
"@xmtp/content-type-reply": "^1.1.5", | ||
"@xmtp/react-sdk": "workspace:*", | ||
"date-fns": "^3.0.6", | ||
"react": "^18.2.0", | ||
"react-18-blockies": "^1.0.6", | ||
"wagmi": "^1.4.7" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.2.38", | ||
"@xmtp/tsconfig": "workspace:*", | ||
"eslint": "^8.54.0", | ||
"eslint-config-xmtp-web": "workspace:*", | ||
"prettier": "^3.1.1", | ||
"typescript": "^5.3.2" | ||
} | ||
} |
File renamed without changes
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...start/src/components/ConversationCard.tsx → ...react/src/components/ConversationCard.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
2 changes: 1 addition & 1 deletion
2
...ickstart/src/components/Conversations.tsx → apps/react/src/components/Conversations.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.
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.
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.
File renamed without changes.
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
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
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...eact-components/src/components/Avatar.tsx → apps/react/src/components/library/Avatar.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.wrapper { | ||
background-color: var(--xmtp-action-color-primary); | ||
color: white; | ||
border: 0; | ||
padding: 8px 12px; | ||
border-radius: 8px; | ||
font-weight: bold; | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
} | ||
|
||
.secondary { | ||
background-color: var(--xmtp-action-color-secondary); | ||
color: var(--xmtp-text-color-primary); | ||
} |
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,22 @@ | ||
import type { PropsWithChildren } from "react"; | ||
import styles from "./Button.module.css"; | ||
|
||
type ButtonProps = PropsWithChildren & { | ||
icon?: React.ReactNode; | ||
onClick?: React.DOMAttributes<HTMLButtonElement>["onClick"]; | ||
secondary?: boolean; | ||
}; | ||
|
||
export const Button: React.FC<ButtonProps> = ({ | ||
children, | ||
icon, | ||
onClick, | ||
secondary, | ||
}) => ( | ||
<button | ||
className={`${styles.wrapper} ${secondary ? styles.secondary : ""}`} | ||
type="button" | ||
onClick={onClick}> | ||
{icon} {children} | ||
</button> | ||
); |
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
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...components/src/components/DateDivider.tsx → ...ct/src/components/library/DateDivider.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
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...s/src/components/Loaders/ButtonLoader.tsx → ...mponents/library/Loaders/ButtonLoader.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
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
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
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
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
File renamed without changes.
Oops, something went wrong.