mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-23 06:42:15 +10:00
chore: add missing translations
This commit is contained in:
@@ -35,7 +35,11 @@ type ChipItemProps = {
|
||||
onRemove: (index: number) => void;
|
||||
};
|
||||
|
||||
function ChipDragPreview({ chip }: { chip: string }) {
|
||||
type ChipDragPreviewProps = {
|
||||
chip: string;
|
||||
};
|
||||
|
||||
function ChipDragPreview({ chip }: ChipDragPreviewProps) {
|
||||
return (
|
||||
<Badge
|
||||
variant="outline"
|
||||
@@ -46,7 +50,11 @@ function ChipDragPreview({ chip }: { chip: string }) {
|
||||
);
|
||||
}
|
||||
|
||||
function ChipDragOverlay({ activeChip }: { activeChip: string | null }) {
|
||||
type ChipDragOverlayProps = {
|
||||
activeChip: string | null;
|
||||
};
|
||||
|
||||
function ChipDragOverlay({ activeChip }: ChipDragOverlayProps) {
|
||||
const overlay = (
|
||||
<DragOverlay dropAnimation={null}>{activeChip ? <ChipDragPreview chip={activeChip} /> : null}</DragOverlay>
|
||||
);
|
||||
|
||||
@@ -7,6 +7,10 @@ import { I18nProvider } from "@lingui/react";
|
||||
|
||||
const queryResult = vi.hoisted(() => ({ data: undefined as number | undefined }));
|
||||
|
||||
type CountUpProps = {
|
||||
to: number;
|
||||
};
|
||||
|
||||
vi.mock("@tanstack/react-query", () => ({
|
||||
useQuery: () => queryResult,
|
||||
}));
|
||||
@@ -14,7 +18,7 @@ vi.mock("@/libs/orpc/client", () => ({
|
||||
orpc: { statistics: { github: { getStarCount: { queryOptions: () => ({}) } } } },
|
||||
}));
|
||||
vi.mock("../animation/count-up", () => ({
|
||||
CountUp: ({ to }: { to: number }) => <span data-testid="count-up">{to.toLocaleString()}</span>,
|
||||
CountUp: ({ to }: CountUpProps) => <span data-testid="count-up">{to.toLocaleString()}</span>,
|
||||
}));
|
||||
|
||||
const { GithubStarsButton } = await import("./github-stars-button");
|
||||
|
||||
@@ -5,23 +5,20 @@ import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { i18n } from "@lingui/core";
|
||||
import { I18nProvider } from "@lingui/react";
|
||||
|
||||
type GridProps = {
|
||||
rowCount: number;
|
||||
columnCount: number;
|
||||
cellComponent: React.ComponentType<
|
||||
{ rowIndex: number; columnIndex: number; style: React.CSSProperties } & Record<string, unknown>
|
||||
>;
|
||||
cellProps: Record<string, unknown>;
|
||||
};
|
||||
|
||||
// react-window's <Grid> uses ResizeObserver / IntersectionObserver heavily and
|
||||
// expects measurable layouts that happy-dom can't provide. Stub it with a simple
|
||||
// pass-through that renders the first row of cells via the supplied cellComponent.
|
||||
vi.mock("react-window", () => ({
|
||||
Grid: ({
|
||||
rowCount,
|
||||
columnCount,
|
||||
cellComponent: CellComponent,
|
||||
cellProps,
|
||||
}: {
|
||||
rowCount: number;
|
||||
columnCount: number;
|
||||
cellComponent: React.ComponentType<
|
||||
{ rowIndex: number; columnIndex: number; style: React.CSSProperties } & Record<string, unknown>
|
||||
>;
|
||||
cellProps: Record<string, unknown>;
|
||||
}) => {
|
||||
Grid: ({ rowCount, columnCount, cellComponent: CellComponent, cellProps }: GridProps) => {
|
||||
const cells: React.ReactNode[] = [];
|
||||
for (let r = 0; r < Math.min(rowCount, 1); r++) {
|
||||
for (let c = 0; c < columnCount; c++) {
|
||||
|
||||
@@ -372,7 +372,12 @@ function useEditorToolbarState(editor: Editor) {
|
||||
|
||||
type EditorToolbarState = ReturnType<typeof useEditorToolbarState>;
|
||||
|
||||
function EditorToolbar({ editor, isFullscreen }: { editor: Editor; isFullscreen: boolean }) {
|
||||
type EditorToolbarProps = {
|
||||
editor: Editor;
|
||||
isFullscreen: boolean;
|
||||
};
|
||||
|
||||
function EditorToolbar({ editor, isFullscreen }: EditorToolbarProps) {
|
||||
const state = useEditorToolbarState(editor);
|
||||
|
||||
return renderEditorToolbar(state, isFullscreen);
|
||||
|
||||
Reference in New Issue
Block a user