Skip to content

Commit

Permalink
Merge pull request #165 from jbrunton/fix-client-build
Browse files Browse the repository at this point in the history
fix: client build
  • Loading branch information
jbrunton authored Aug 31, 2024
2 parents a9df5e8 + b08725c commit bd8bfc1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
- run: pnpm install
- run: pnpm run lint

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm run build

test:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -48,7 +56,7 @@ jobs:
- run: pnpm run test:int

test-e2e:
needs: [lint, test, test-int, pulumi]
needs: [lint, build, test, test-int, pulumi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions client/src/features/room/organisms/ChatBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const JoinAlert = ({ roomResponse }: ChatBoxProps): ReactElement => {
const requiresApproval = roomResponse.room.joinPolicy === 'request'
const awaitingApproval = roomResponse.status === 'PendingApproval'

const { mutate: joinRoom, isLoading, isSuccess: isJoined } = useJoinRoom(roomId)
const { mutate: joinRoom, isPending, isSuccess: isJoined } = useJoinRoom(roomId)

useEffect(() => {
if (isJoined) {
Expand All @@ -40,7 +40,7 @@ const JoinAlert = ({ roomResponse }: ChatBoxProps): ReactElement => {
<AlertIcon />
Join this room to chat.
<Spacer />
<Button rightIcon={isLoading ? <Spinner /> : undefined} onClick={() => joinRoom()}>
<Button rightIcon={isPending ? <Spinner /> : undefined} onClick={() => joinRoom()}>
{requiresApproval ? 'Request to Join' : 'Join'}
</Button>
</Alert>
Expand All @@ -61,7 +61,7 @@ export const ChatBox: React.FC<ChatBoxProps> = ({ roomResponse }: ChatBoxProps):
const [content, setContent] = useState<string>('')
const { data: user, isLoading } = useUserDetails()
const joined = user?.rooms.some((room) => room.id === roomId)
const { mutate: postMessage, isLoading: isSending } = usePostMessage(roomId, content)
const { mutate: postMessage, isPending: isSending } = usePostMessage(roomId, content)
const inputRef = useRef<HTMLTextAreaElement>(null)

useEffect(() => {
Expand Down

0 comments on commit bd8bfc1

Please sign in to comment.