Skip to content

Instantly share code, notes, and snippets.

View kaineer's full-sized avatar
:octocat:
⌨️ 🖱️

Sergey Kluchkovsky kaineer

:octocat:
⌨️ 🖱️
View GitHub Profile
isQuestionEditingDisabled(state) {
const isEditable = editableQuestionStates.includes(
state.wrapper.status
);
return !isEditable;
}
@kaineer
kaineer / 09.md
Last active November 5, 2024 06:08
@kaineer
kaineer / 09.md
Last active November 5, 2024 06:02

kazah0s, задание 09

  • index.js:90 Нужно добавить вызов handler, чтобы исправленный тест отрабатывал. Та же история с CheckboxInput#subscribe
@kaineer
kaineer / 09.md
Last active November 5, 2024 05:52

Dekuhub, задание 09

  • index.js:72 Лишняя строчка
  • index.js:107 Имя переменной при создании lebel, при использовании label.
  • index.js:109 Объект с именем div не был создан.
const context = ['sin', 'cos', 'exp']
.map((name) => ('const ' + name + ' = Math.' + name + '; '))
.join('');
export const buildFunction = (fn: string): (x: number) => number => {
const fullFn = '(x) => { ' + context + ' return (' + fn + '); }';
return eval(fullFn);
}
onInput={() =>
setGroupState({
...state,
mentorsGroupName: groupNameRef.current?.value || '',
})
}
PostAnswerVerificationAndRemoveFiles: build.mutation<unknown, AnswerCheckAndRemoveFilesPayload>({
async queryFn(payload, _queryApi, _extraOptions, fetchWithBQ) {
const checkPayload: AnswerCheckPayload = {
playerId: payload.playerId,
nodeId: payload.nodeId,
answerStatus: payload.answerStatus,
mentorsComment: payload.mentorsComment
};
const reviewResult = await fetchWithBQ({
{
"classes": {
"listItem": "py-3 sm:py-4 w-100",
"container": "flex items-center space-x-4 cursor-pointer",
"wrapper": "min-w-0 flex-1",
"userName": "truncate text-sm font-medium text-gray-900",
"iconContainer": "inline-flex items-center text-base font-semibold text-gray-900"
}
}
return (
<Card className={ classes.card }
onClick={() => {
createTypedQuizRequest(type);
setLoading(isLoading);
}}
>
<h5 className={ classes.header }>{ title }</h5>
<p className={ classes.description }>{ description }</p>
</Card>
interface LazyProps {
condition: boolean;
render: () => React.ReactNode;
fallback?: () => React.ReactNode;
}
export const LazyWhen = ({ condition, render, fallback }: LazyProps) => {
if (condition) {
return render();
}