* fix #517

* delete commented test for build pass

* fix unrelated formatting errors
This commit is contained in:
Vivek Ganesan 2023-04-17 19:03:31 +05:30 committed by GitHub
parent c59dda1e49
commit d0cb44a566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 34 deletions

View File

@ -52,19 +52,8 @@ export function NoteCreator() {
const { formatMessage } = useIntl();
const publisher = useEventPublisher();
const uploader = useFileUpload();
const {
note,
zapForward,
sensitive,
pollOptions,
replyTo,
otherEvents,
preview,
active,
show,
showAdvanced,
error,
} = useSelector((s: RootState) => s.noteCreator);
const { note, zapForward, sensitive, pollOptions, replyTo, otherEvents, preview, active, show, showAdvanced, error } =
useSelector((s: RootState) => s.noteCreator);
const [uploadInProgress, setUploadInProgress] = useState(false);
const dispatch = useDispatch();

View File

@ -74,6 +74,7 @@ export interface UserPreferences {
}
export const DefaultPreferences = {
language: "en",
enableReactions: true,
reactionEmoji: "+",
autoLoadMedia: "follows-only",

View File

@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
import emoji from "@jukben/emoji-search";
import useLogin from "Hooks/useLogin";
import { updatePreferences, UserPreferences } from "Login";
import { DefaultPreferences, updatePreferences, UserPreferences } from "Login";
import { DefaultImgProxy } from "Const";
import { unwrap } from "Util";
@ -30,7 +30,7 @@ const PreferencesPage = () => {
</div>
<div>
<select
value={perf.language}
value={perf.language || DefaultPreferences.language}
onChange={e =>
updatePreferences(login, {
...perf,

View File

@ -23,7 +23,7 @@ const InitState: NoteCreatorStore = {
showAdvanced: false,
zapForward: "",
sensitive: "",
otherEvents: []
otherEvents: [],
};
const NoteCreatorSlice = createSlice({

View File

@ -1,18 +0,0 @@
/*import { EventKind } from "@snort/nostr";
import { EventBuilder } from "./EventBuilder";
const PubKey = "test-key";
describe("EventBuilder", () => {
it("should not add duplicate tags", () => {
const eb = new EventBuilder();
eb.pubKey(PubKey);
eb.kind(EventKind.TextNote);
eb.tag(["p", PubKey]);
eb.tag(["p", PubKey]);
const out = eb.build();
expect(out.tags.length).toBe(1);
});
});
*/