Aidam
Aidam
TTCTheo's Typesafe Cult
Created by Aidam on 11/19/2023 in #questions
tRPC loading state
Right now I am handling displaying a loading state like this
const query = ...;
const [loading, setLoading] = useState(true);
const {data:queryResult} = query.useQuery();
if(qury && loading) setLoading(false);
const query = ...;
const [loading, setLoading] = useState(true);
const {data:queryResult} = query.useQuery();
if(qury && loading) setLoading(false);
Is there a better way to handle a loading state?
4 replies
TTCTheo's Typesafe Cult
Created by Aidam on 11/16/2023 in #questions
NextAuth google provider sometimes doesn't fetch image
When I open the link from the Database the image displays as normal, the Image tag also get rendered however the content appears only about on every 10th attempt, I didn't modify my nextauth file at all
6 replies
TTCTheo's Typesafe Cult
Created by Aidam on 11/9/2023 in #questions
Overscroll color
No description
2 replies
TTCTheo's Typesafe Cult
Created by Aidam on 10/22/2023 in #questions
How can I access the entire user model and not just id, name, email and image?
I want to access the entire model in the session, when I add the properties how can I automatically pull the values from the db?
8 replies
TTCTheo's Typesafe Cult
Created by Aidam on 10/21/2023 in #questions
Run additional code on user creation
I want to run additional code on user creation, how do I achieve this?
11 replies
TTCTheo's Typesafe Cult
Created by Aidam on 10/17/2023 in #questions
React Native with T3
Anyone got any experience with using React Native and T3?
4 replies
TTCTheo's Typesafe Cult
Created by Aidam on 10/4/2023 in #questions
Cannot connect to Docker Postgres DB on second computer
I have a postgres database sitting in docker I am developing on two seperate computers, Notebook and Desktop. On Desktop everything works but on my Notebook I cannot authenticate to the DB This is the docker-compose.yml file.
version: '3.8'

services:
postgres:
image: postgres:latest
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_USER}
POSTGRES_DB: ${DB}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- ${DB_PORTS}

volumes:
db_data: {}
version: '3.8'

services:
postgres:
image: postgres:latest
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_USER}
POSTGRES_DB: ${DB}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- ${DB_PORTS}

volumes:
db_data: {}
I have this config in my .env file
#Docker
DATABASE_USER="postgres"
DATABASE_PASSWORD="admin"
DB="db"
DB_PORTS="5432:5432"

# Prisma
# https://www.prisma.io/docs/reference/database-reference/connection-urls#env
DATABASE_URL="postgres://postgres:[email protected]:5432/db"
#Docker
DATABASE_USER="postgres"
DATABASE_PASSWORD="admin"
DB="db"
DB_PORTS="5432:5432"

# Prisma
# https://www.prisma.io/docs/reference/database-reference/connection-urls#env
DATABASE_URL="postgres://postgres:[email protected]:5432/db"
Does anyone know why I can't connect to the DB on Notebook?
1 replies