Ambushfall
Ambushfall
TTCTheo's Typesafe Cult
Created by peternovak on 5/8/2023 in #questions
Railway: Connection reset by peer
To be fair, I use the T3 docks If I'm in the need of something trpc/zod/prisma related. Not sure if those count
5 replies
TTCTheo's Typesafe Cult
Created by BILLY on 5/8/2023 in #questions
Next.js metadata title template
backticks aren't required
7 replies
TTCTheo's Typesafe Cult
Created by BILLY on 5/8/2023 in #questions
Next.js metadata title template
just swap it with
export const metadata = {
title: {
default: 'Calendr',
template: '%s | Calendr',
},
// etc...
}
export const metadata = {
title: {
default: 'Calendr',
template: '%s | Calendr',
},
// etc...
}
7 replies
TTCTheo's Typesafe Cult
Created by BILLY on 5/8/2023 in #questions
Next.js metadata title template
Hey, template strings are not used
7 replies
TTCTheo's Typesafe Cult
Created by peternovak on 5/8/2023 in #questions
Railway: Connection reset by peer
Network issues, process halting, terminating uncleanly, etc. Could be a lot of things
5 replies
TTCTheo's Typesafe Cult
Created by kalufankar on 5/8/2023 in #questions
Next TRPC backend Extension
If it's a monorepo, you can consume it from the tRPC client internally.
5 replies
TTCTheo's Typesafe Cult
Created by kalufankar on 5/8/2023 in #questions
Next TRPC backend Extension
5 replies
TTCTheo's Typesafe Cult
Created by Ambushfall on 5/7/2023 in #questions
Using revalidate on a page fails build
A little more background: Using the app folder, server component to fetch from an internally exposed API errors when setting revalidate. Are we to use the exposed API only in client components?
const response = await fetch(`${process.env.NEXT_PUBLIC_HOST}/github/${username}`);
return await response.json();
const response = await fetch(`${process.env.NEXT_PUBLIC_HOST}/github/${username}`);
return await response.json();
2 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 5/5/2023 in #questions
How do you setup Shadcn with Create t3?
heheh :3
16 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 5/5/2023 in #questions
How do you setup Shadcn with Create t3?
Because you can? xD Just a showcase that it works, I'm not going to use it otherwise
16 replies
TTCTheo's Typesafe Cult
Created by Ambushfall on 5/4/2023 in #questions
[Solved] Dynamically generated NavLinks have weird behavior on ISR
Works without any quirky behavior, hope this helps someone someday
6 replies
TTCTheo's Typesafe Cult
Created by Ambushfall on 5/4/2023 in #questions
[Solved] Dynamically generated NavLinks have weird behavior on ISR
then importing into layouts using:
import { hrefs } from 'paths.json'

...


const filterDirectories = data['hrefs']
{filterDirectories?.map((item: string, index:number) => <NavLinkTailwind key={index} href={`/${item}`} NavItemName={item} />)}
import { hrefs } from 'paths.json'

...


const filterDirectories = data['hrefs']
{filterDirectories?.map((item: string, index:number) => <NavLinkTailwind key={index} href={`/${item}`} NavItemName={item} />)}
6 replies
TTCTheo's Typesafe Cult
Created by Ambushfall on 5/4/2023 in #questions
[Solved] Dynamically generated NavLinks have weird behavior on ISR
Moving the logic from layouts.tsx to a prebuild step that generates JSON, then importing that JSON sorted out the issue. For anyone interested: prebuild.js
const fs = require('fs/promises')
const path = require('path')

async function run() {
const reg = /^([^.]+)$/g;
const appDirectory = path.join(process.cwd(), '/app');
const appFilenames = await fs.readdir(appDirectory)
const filterDirectories = appFilenames.filter((e) => e.match(reg) ? e !== 'components' && e !== 'api' && e !== 'github' && e !== 'editor' : false)

// console.log(filterDirectories)

const obj = new Object({ hrefs: filterDirectories })
console.log(obj)
fs.writeFile("paths.json", JSON.stringify(obj), function (err) {
if (err) throw err;
console.log('complete');
}
);
}

run()
const fs = require('fs/promises')
const path = require('path')

async function run() {
const reg = /^([^.]+)$/g;
const appDirectory = path.join(process.cwd(), '/app');
const appFilenames = await fs.readdir(appDirectory)
const filterDirectories = appFilenames.filter((e) => e.match(reg) ? e !== 'components' && e !== 'api' && e !== 'github' && e !== 'editor' : false)

// console.log(filterDirectories)

const obj = new Object({ hrefs: filterDirectories })
console.log(obj)
fs.writeFile("paths.json", JSON.stringify(obj), function (err) {
if (err) throw err;
console.log('complete');
}
);
}

run()
6 replies
TTCTheo's Typesafe Cult
Created by Ambushfall on 5/4/2023 in #questions
[Solved] Dynamically generated NavLinks have weird behavior on ISR
Issue resolved
6 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 5/5/2023 in #questions
How do you setup Shadcn with Create t3?
Just the way to install it requires manual setup usually, hope you got your difficulties resolved
16 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 5/5/2023 in #questions
How do you setup Shadcn with Create t3?
16 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 5/5/2023 in #questions
How do you setup Shadcn with Create t3?
16 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 5/5/2023 in #questions
How do you setup Shadcn with Create t3?
I've also had the error, declaring their mod.d.ts helped
16 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 5/5/2023 in #questions
How do you setup Shadcn with Create t3?
Going through it, I'd just use cva myself and not use their component lib
16 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 5/5/2023 in #questions
How do you setup Shadcn with Create t3?
I've just got it setup
16 replies