Skip to content

Commit

Permalink
fix: export folds
Browse files Browse the repository at this point in the history
  • Loading branch information
bmhung committed Mar 21, 2024
1 parent b3eb465 commit 41246ce
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lemonadesocial/cinny",
"version": "3.2.0-lemonade.4",
"version": "3.2.0-lemonade.6",
"description": "Yet another matrix client",
"files": [
"dist"
Expand Down Expand Up @@ -48,7 +48,7 @@
"file-saver": "2.0.5",
"flux": "4.0.3",
"focus-trap-react": "10.0.2",
"folds": "1.5.0",
"folds": "1.5.1",
"formik": "2.2.9",
"html-dom-parser": "4.0.0",
"html-react-parser": "4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/utils/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const getStateEvent = (
room: Room,
eventType: StateEvent,
stateKey = ''
): MatrixEvent | undefined => room.currentState.getStateEvents(eventType, stateKey) ?? undefined;
): MatrixEvent | undefined => room.currentState?.getStateEvents(eventType, stateKey) ?? undefined;

export const getStateEvents = (room: Room, eventType: StateEvent): MatrixEvent[] =>
room.currentState.getStateEvents(eventType);
Expand Down
11 changes: 4 additions & 7 deletions src/lemonade/client/templates/BasicRoomView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import React, { useRef } from 'react';
import PropTypes from 'prop-types';

import { Room } from 'matrix-js-sdk/src/models/room';

import { RoomTimeline } from '../../../app/organisms/room/RoomTimeline';
import { RoomViewTyping } from '../../../app/organisms/room/RoomViewTyping';
import { RoomInput } from '../../../app/organisms/room/RoomInput';
Expand All @@ -10,7 +12,7 @@ import { PowerLevelsContextProvider, usePowerLevels } from '../../../app/hooks/u

import '../../../app/organisms/room/RoomView.scss';

function BasicRoomView({ room, eventId }) {
function BasicRoomView({ room }) {
const roomViewRef = useRef(null);
const roomInputRef = useRef(null);
const editor = useEditor();
Expand All @@ -26,7 +28,6 @@ function BasicRoomView({ room, eventId }) {
<RoomTimeline
key={roomId}
room={room}
eventId={eventId}
roomInputRef={roomInputRef}
editor={editor}
/>
Expand All @@ -47,12 +48,8 @@ function BasicRoomView({ room, eventId }) {
);
}

BasicRoomView.defaultProps = {
eventId: null,
};
BasicRoomView.propTypes = {
roomTimeline: PropTypes.shape({ roomId: PropTypes.string }).isRequired,
eventId: PropTypes.string,
room: Room.isRequired,
};

export default BasicRoomView;
5 changes: 5 additions & 0 deletions src/lemonade/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import RoomTimeline from '../client/state/RoomTimeline';
import RoomView from '../app/organisms/room/RoomView';
import { CinnyActionContext } from './client/ActionContext';
import { CinnyStateContext } from './client/StateContext';
import 'folds/dist/style.css';

import { configClass, varsClass } from 'folds/dist/index.js';

export {
cons,
Expand All @@ -32,4 +35,6 @@ export {
CinnyProviders,
RoomTimeline,
RoomView,
configClass,
varsClass,
};
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3439,10 +3439,10 @@ focus-trap@^7.2.0:
dependencies:
tabbable "^6.2.0"

[email protected].0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/folds/-/folds-1.5.0.tgz#aa3119f91840488bff3f84cd7b843654418e1f29"
integrity sha512-1QNHzD57OxFZT5SOe0nWcrKQvWmfMRv1f5sTF8xhGtwx9rajjv36T9SwCcj9Fh58PbERqOdBiwvpdhu+BQTVjg==
[email protected].1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/folds/-/folds-1.5.1.tgz#c0e924976d58809dc8e65bcd4fe9fead4b198df7"
integrity sha512-2QxyA+FRKjPKXDTMDoD7NmOUiReWrKYO0Msg44QqlzTkTrRVEzJgyPIfC/Ia4/u0ByQpk6dbq8UQxomKmneJ/g==

for-each@^0.3.3:
version "0.3.3"
Expand Down

0 comments on commit 41246ce

Please sign in to comment.