TheSwordBreaker
TheSwordBreaker
Explore posts from servers
DTDrizzle Team
Created by TheSwordBreaker on 10/16/2024 in #help
type definition for tables in customer function
I am Making helper function which need two args like
function helper(db , tables){
const helperFunction = () => ...
const helperFunction2 = () => ...
retrun {
helperFunction,
helperFunction2
}
}

function helper(db, tables1, table2) {
...
}
function helper(db , tables){
const helperFunction = () => ...
const helperFunction2 = () => ...
retrun {
helperFunction,
helperFunction2
}
}

function helper(db, tables1, table2) {
...
}
how to do typeScript for it
4 replies
TTCTheo's Typesafe Cult
Created by TheSwordBreaker on 7/8/2024 in #questions
Next.js Slow Page Load in Dev upto 2 mins
/** @type {import('next').NextConfig} */
const nextConfig = {
// reactStrictMode: true,
output: "export",
distDir: "dist",
swcMinify: true,
trailingSlash: false,
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
modularizeImports: {
"@mui/icons-material/?(((\\w*)?/?)*)": {
transform: "@mui/icons-material/{{ matches.[1] }}/{{member}}",
},
},
images: {
domains: ["tcommer.s3.eu-north-1.amazonaws.com"],
unoptimized: true,
},
}

module.exports = nextConfig`
/** @type {import('next').NextConfig} */
const nextConfig = {
// reactStrictMode: true,
output: "export",
distDir: "dist",
swcMinify: true,
trailingSlash: false,
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
modularizeImports: {
"@mui/icons-material/?(((\\w*)?/?)*)": {
transform: "@mui/icons-material/{{ matches.[1] }}/{{member}}",
},
},
images: {
domains: ["tcommer.s3.eu-north-1.amazonaws.com"],
unoptimized: true,
},
}

module.exports = nextConfig`
4 replies
TTCTheo's Typesafe Cult
Created by TheSwordBreaker on 6/20/2024 in #questions
How to Call Hooks in sequence way
I'm utilizing Google Maps Address AutoComplete and I have two hooks. The first hook needs to work when the other hook is complete.
import { useJsApiLoader } from "@react-google-maps/api";
import usePlacesAutocomplete from "use-places-autocomplete";

const { isLoaded } = useJsApiLoader({ libraries, googleMapsApiKey });
const { ready, value, suggestions, setValue } = usePlacesAutocomplete();
import { useJsApiLoader } from "@react-google-maps/api";
import usePlacesAutocomplete from "use-places-autocomplete";

const { isLoaded } = useJsApiLoader({ libraries, googleMapsApiKey });
const { ready, value, suggestions, setValue } = usePlacesAutocomplete();
5 replies