Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions new-frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
// Patch Node prototype for DOM error handling
if (typeof Node === 'function' && Node.prototype) {
const originalRemoveChild = Node.prototype.removeChild;
(Node.prototype as any).removeChild = function(child: any) {
if (child.parentNode !== this) {
if (console) {
console.error('Cannot remove a child from a different parent', child, this);
}
return child;
}
return originalRemoveChild.call(this, child);
}

const originalInsertBefore = Node.prototype.insertBefore;
(Node.prototype as any).insertBefore = function(newNode: any, referenceNode: any) {
if (referenceNode && referenceNode.parentNode !== this) {
if (console) {
console.error('Cannot insert before a reference node from a different parent', referenceNode, this);
}
return newNode;
}
return originalInsertBefore.call(this, newNode, referenceNode);
}
}

import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
Expand Down
6 changes: 3 additions & 3 deletions new-frontend/src/types/supabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ export type Database = {
category_id: string
gender: Database["public"]["Enums"]["gender_enum"]
quantity: number
size_id: string | null
size_id: string
}
Insert: {
box_content_id?: string
box_id: string
category_id: string
gender: Database["public"]["Enums"]["gender_enum"]
quantity?: number
size_id?: string | null
size_id?: string
}
Update: {
box_content_id?: string
box_id?: string
category_id?: string
gender?: Database["public"]["Enums"]["gender_enum"]
quantity?: number
size_id?: string | null
size_id?: string
}
Relationships: [
{
Expand Down