Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

2023-04-25: Feedback zur Abgabe #4

Draft
wants to merge 117 commits into
base: initial
Choose a base branch
from
Draft

Conversation

petermanser
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Apr 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
z-index-next-app-at ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2023 8:18am

@@ -34,3 +42,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# vscode
.vscode
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gehört egtl. in die Config des individuellen Entwicklers ~/.gitignore (da ihr das wohl für jedes Projekt so wollt und nicht alle verschiedenen Umgebungen ins Projekt .gitignore sollten.


type PageProps = {};
export default function TimelinePage() {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Komponente sollte durch Auslagerung vereinfacht werden. (Beispielsweise neue Posts im Background laden)

isDisabled: true,
text: '',
});
const [state, dispatch] = useReducer(mumbleDetailReducer, {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useState und useReducer zu mischen kann gefährlich werden. Es würde sich anbieten, eine Strategie zu verfolgen.

<Modal
title="Oops."
isOpen={state.hasError}
LLable="Abbrechen"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wo?

};

const likePost = async (isLiked: boolean, id: string) => {
console.log(profileState);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sollte entfernt werden, da debug code.

}

const headers = new Headers();
headers.append('Authorization', `Bearer ${token}`);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (token) {
  headers.append('Authorization', `Bearer ${token}`);
}

Oder sogar zu Beginn handeln, da ohne Token ja nicht möglich. (Custom Error throwen)

/>
<meta name="author" content="Attila Toth" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{`${convertRouteToSiteName(router.route)} | Mumble`}</title>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coole Idee, aber auch etwas gefährlich (bspw. Einführung neue Seiten)

}
return state.matches('idle') || state.matches('mutationFailed');
});
return Promise.resolve();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eine Async Funktion returned immer implizit eine Promise, sollte entfernt werden können

});
};

const submitPost = async (image: File | undefined, text: string) => {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Handling?

isDisabled: true,
text: '',
});
const machineService = useInterpret(profileMachine);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sehr schön hast du mit xState gearbeitet. 👏

useMachine wäre für diesen Use Case geeigneter und einfacher gewesen. Und das Wrappen der send-Function in eine zusätzliche Funktion verringert die Lesbarkeit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants