venus
venus
Explore posts from servers
TTCTheo's Typesafe Cult
Created by venus on 2/27/2023 in #questions
Dynamic subdomains
thanks! one more thing, those blogs are talking about different domains whereas i want tot start with subdomains first, does the pattern apply the same?
20 replies
TTCTheo's Typesafe Cult
Created by venus on 2/27/2023 in #questions
Dynamic subdomains
Thanks, I would prefer the non vercel one, since I am going to have it all in one Docker container (or for now its the goal). But yeah, thank you.
20 replies
TTCTheo's Typesafe Cult
Created by venus on 2/27/2023 in #questions
Dynamic subdomains
Okay, I will take a look on that. Do you have any resource about it? The setup is: NodeJS as the API and Next.js on client.
20 replies
TTCTheo's Typesafe Cult
Created by venus on 1/29/2023 in #questions
Override ENV variables inside Docker Compose
When I try to log the ENV vars using - command: env, then the ENV var change won't get affected
DATABASE_URL=mysql://<user>:<pw>@mysql:<port>/<db>
DB_NAME=
SERVER_URL=
DB_PASSWORD=
DB_HOST=
DB_USER=
DATABASE_URL=mysql://<user>:<pw>@mysql:<port>/<db>
DB_NAME=
SERVER_URL=
DB_PASSWORD=
DB_HOST=
DB_USER=
2 replies
TTCTheo's Typesafe Cult
Created by venus on 1/26/2023 in #questions
ZSH Extension?
thanks! ❤️
3 replies
TTCTheo's Typesafe Cult
Created by venus on 12/25/2022 in #questions
Strategy to test components in React
Thanks for you opinion! This is good thought and for my purpose I think it does the thing. I guess tests are very opinionative (at least what should be tested), because it relies on many factors.
8 replies
TTCTheo's Typesafe Cult
Created by venus on 12/25/2022 in #questions
Strategy to test components in React
Theo whole test file looks like so:
describe('Heading', () => {
const levels = [1, 2, 3, 4, 5, 6] as const;

it('should match the snapshot', () => {
const { asFragment } = render(<Heading level="1">Heading 1</Heading>);

expect(asFragment()).toMatchSnapshot();
});

it('should render the heading', () => {
render(<Heading level="3">Heading 3</Heading>);

expect(screen.getByText('Heading 3')).toBeInTheDocument();
});

it.each(levels)('should rener heading level %s', (level: HeadingLevel) => {
render(<Heading level={level}>Heading {level}</Heading>);

expect(screen.getByRole('heading', { level })).toBeInTheDocument();
});
});
describe('Heading', () => {
const levels = [1, 2, 3, 4, 5, 6] as const;

it('should match the snapshot', () => {
const { asFragment } = render(<Heading level="1">Heading 1</Heading>);

expect(asFragment()).toMatchSnapshot();
});

it('should render the heading', () => {
render(<Heading level="3">Heading 3</Heading>);

expect(screen.getByText('Heading 3')).toBeInTheDocument();
});

it.each(levels)('should rener heading level %s', (level: HeadingLevel) => {
render(<Heading level={level}>Heading {level}</Heading>);

expect(screen.getByRole('heading', { level })).toBeInTheDocument();
});
});
8 replies
TTCTheo's Typesafe Cult
Created by venus on 12/14/2022 in #questions
Which drag and drop lib would you recommend me these days?
thanks y'all
19 replies
TTCTheo's Typesafe Cult
Created by venus on 12/14/2022 in #questions
Which drag and drop lib would you recommend me these days?
but like the simplicity about DND kit and it's really small project, so it's okay to use
19 replies
TTCTheo's Typesafe Cult
Created by venus on 12/14/2022 in #questions
Which drag and drop lib would you recommend me these days?
yeah I know about beautiful DND
19 replies
RReactiflux
Created by venus on 12/14/2022 in #help-js
venus – 18-08 Dec 14
you're right, good point -> value !== 0 ? 1 : 0
16 replies
RReactiflux
Created by venus on 12/14/2022 in #help-js
venus – 18-08 Dec 14
or Number(value > 0)
16 replies
RReactiflux
Created by venus on 12/14/2022 in #help-js
venus – 18-08 Dec 14
so this should be the correct way to write it, right? const v3 = value > 0 ? 1 : 0;
16 replies
RReactiflux
Created by venus on 12/14/2022 in #help-js
venus – 18-08 Dec 14
good to know, thanks 🙂
16 replies