dex
dex
TTCTheo's Typesafe Cult
Created by alfilo on 2/12/2024 in #questions
React queue simulation
In your setTimeout, the filter goes through every queue with the same message then deletes them all, its not unique to one queue. Try using msgId as the filter (assuming its unique)
4 replies
TTCTheo's Typesafe Cult
Created by dex on 1/19/2024 in #questions
How to stop outline from showing after closing dropdown?
6 replies
TTCTheo's Typesafe Cult
Created by dex on 1/19/2024 in #questions
How to stop outline from showing after closing dropdown?
Fixed it. Added this line to the component
<DropdownMenuPrimitive.Content
onCloseAutoFocus={(e) => e.preventDefault()}
>
<DropdownMenuPrimitive.Content
onCloseAutoFocus={(e) => e.preventDefault()}
>
6 replies
TTCTheo's Typesafe Cult
Created by dex on 1/19/2024 in #questions
How to stop outline from showing after closing dropdown?
<DropdownMenu>
<DropdownMenuTrigger>
<MoreVertical />
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem>Flashcards</DropdownMenuItem>
<DropdownMenuItem>Mindmap</DropdownMenuItem>
<DropdownMenuItem>Pre-test</DropdownMenuItem>
<DropdownMenuItem>Post-test</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<DropdownMenu>
<DropdownMenuTrigger>
<MoreVertical />
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem>Flashcards</DropdownMenuItem>
<DropdownMenuItem>Mindmap</DropdownMenuItem>
<DropdownMenuItem>Pre-test</DropdownMenuItem>
<DropdownMenuItem>Post-test</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
6 replies
TTCTheo's Typesafe Cult
Created by dex on 12/28/2023 in #questions
Error when running `pnpm db:push`
Apparently it didnt like how i had
.$defaultFun(() => createId() )
.$defaultFun(() => createId() )
imported from ~/utils/index.ts
8 replies
TTCTheo's Typesafe Cult
Created by dex on 12/28/2023 in #questions
Error when running `pnpm db:push`
done that already to no avail
8 replies
TTCTheo's Typesafe Cult
Created by dex on 12/28/2023 in #questions
Error when running `pnpm db:push`
First error also occurs with newly created t3-app
8 replies
TTCTheo's Typesafe Cult
Created by dex on 10/21/2023 in #questions
Drizzle migration error with Example table.
nope @dragonflyof99 i just did drizzle-kit generate and manually copies the migrations to TablePlus
6 replies
TTCTheo's Typesafe Cult
Created by dex on 10/21/2023 in #questions
Drizzle migration error with Example table.
export const example = mysqlTable(
"example",
{
id: bigint("id", { mode: "number" }).primaryKey().autoincrement(),
name: varchar("name", { length: 256 }),
createdAt: timestamp("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updatedAt").onUpdateNow(),
},
(example) => ({
nameIndex: uniqueIndex("name_idx").on(example.name),
}),
);
export const example = mysqlTable(
"example",
{
id: bigint("id", { mode: "number" }).primaryKey().autoincrement(),
name: varchar("name", { length: 256 }),
createdAt: timestamp("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updatedAt").onUpdateNow(),
},
(example) => ({
nameIndex: uniqueIndex("name_idx").on(example.name),
}),
);
6 replies
TTCTheo's Typesafe Cult
Created by dex on 10/21/2023 in #questions
Drizzle migration error with Example table.
For more context: I created a t3-app, put in the env variables needed, ran db:push, changed the users schema then tried to run db:push again. But I get this error because of the example table which I did not change.
6 replies