Skip to content

Instantly share code, notes, and snippets.

View satansdeer's full-sized avatar
🚜
Traktor-schooling

Maksim Ivanov satansdeer

🚜
Traktor-schooling
View GitHub Profile
.centeredFlex {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.panel {
z-index: 10;
position: absolute;
bottom: -10px;
left: 60px;
background: white;
width: 200px;
padding: 6px;
transform: translateY(100%);
border-radius: 4px;
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
.container {
padding-left: 40px;
padding-right: 40px;
max-width: 900px;
}
.title {
padding: 6px;
}
.spacer {
height: 200px;
width: 100%;
padding: 0 46px;
color: grey;
}
.node {
border-radius: 4px;
padding: 6px;
cursor: text;
width: 100%;
}
.page {
cursor: pointer;
font-weight: bold;
import { useState } from "react";
import { NodeData } from "../utils/types";
import { useFocusedNodeIndex } from "./useFocusedNodeIndex";
import { Cover } from "./Cover";
import { Spacer } from "./Spacer";
import { BasicNode } from "../Node/BasicNode";
import { Title } from "./Title";
import { nanoid } from "nanoid";
export const Page = () => {
let solutions = []; // Points array
const checkCells = (...cells) => {
return !!cells[0] && cells[0] === cells[1] && cells[1] === cells[2];
};
const checkWinConditions = (solution) => {
let board = newBoard();
solution.forEach((cell, k) => {
board[cell[0]][cell[1]] = k % 2 ? "x" : "y";
// -------------------- HOC definition ----
type InjectedProps = {
initialState: AppState
}
export function withData<TProps>(
WrappedComponent: React.JSXElementConstructor<TProps & InjectedProps>
) {
const WrapperComponent: React.FC<Omit<TProps, keyof InjectedProps>> = ({ children, ...props }) => {
## Вебинар Тестирование Реакт Приложений
- Как настроить окружение
- Jest
- React Testing Library
- React Hooks Testing Library
- Какие плагины я использую
- VSCode Jest Plugin
- Как понять что тестировать
- Рендер