Daniel K
TTCTheo's Typesafe Cult
•Created by Daniel K on 9/19/2023 in #questions
NEXT JS APP Hosting on AWS
This will be basically a stupid question, I guess, but I could not find an answer, so I hope you guys can help me out.
I have a nextjs project that is basically a gallery portfolio page, and I am using the nextjs server components as well as the client ones.
Is my application still a static website if I am using server components? The reason I ask this is because I would like to host the site in a S3 bucket, but as far as I know, this is only for static websites.
My server components are actually the whole gallery.
13 replies
TTCTheo's Typesafe Cult
•Created by Daniel K on 7/25/2023 in #questions
Where to store pictures? Gallery Page
Hey, I did my first private project for someone which is a Gallery.
I used vite to create it and used mainly typescript in there. Its now just a frontend application.
I store all the pictures in the project itself which is now quite much and I would like to move the pictures somewhere else.
My first thought would be to store it in S3 and then to the api call to like get in into the gallery. Unfortunately I don't know exactly how this should be done or even how to google it correctly. Do you know guys if there is like a documentation on how to achieve such things? Or will I need even a backend for it? I would really appreciate any guideline on how I could start on this.
Moreover I also heard much things about cloudflares stored etc. What are here the best practices or what are your experience with using cloud storage in general?
9 replies
TTCTheo's Typesafe Cult
•Created by Daniel K on 5/14/2023 in #questions
SVGR doesn't display colors from my SVG
Hi,
I have an svg file which I want to display on my website.
The svg has a linearGradient but when I add it to my code and display it, I only see the svg black without the lineargradient which is defiend.
So in my vite.config.ts file I imported the svgr
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import svgr from "vite-plugin-svgr";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
svgr(),
],
})
I created a svgr.config.js file with the content below
// svgr.config.js
module.exports = {
svgoConfig: {
plugins: {
removeViewBox: false,
},
},
};
Afterwards I import it and display it in my div import { ReactComponent as Logo } from "../assets/svg/logo.svg"
Afterwards I import it and display it in my div import { ReactComponent as Logo } from "../assets/svg/logo.svg"
6 replies