2blo / before-effects

before-effects.vercel.app
0 stars 0 forks source link

User post list #36

Closed 2blo closed 1 year ago

2blo commented 1 year ago

Needed for debugging prod etc

out of scope

2blo commented 1 year ago

wds grid resize vs more rows

2blo commented 1 year ago

undefined api key problem - client side query? - just make a trpc endpoint for it? do it on initial upload and store link in db to reduce nbr if calls?

trpc

initial upload --> db

the thumbnail urls are the same each time,

2blo commented 1 year ago

example res:

etho video:

  thumbnails: {
    default: {
      url: 'https://i.ytimg.com/vi/lHngf-CKCzk/default.jpg',
      width: 120,
      height: 90
    },
    medium: {
      url: 'https://i.ytimg.com/vi/lHngf-CKCzk/mqdefault.jpg',
      width: 320,
      height: 180
    },
    high: {
      url: 'https://i.ytimg.com/vi/lHngf-CKCzk/hqdefault.jpg',
      width: 480,
      height: 360
    }
  },

terminal:

  thumbnails: {
    default: {
      url: 'https://i.ytimg.com/vi/gFcDolkdB9A/default.jpg',
      width: 120,
      height: 90
    },
    medium: {
      url: 'https://i.ytimg.com/vi/gFcDolkdB9A/mqdefault.jpg',
      width: 320,
      height: 180
    },
    high: {
      url: 'https://i.ytimg.com/vi/gFcDolkdB9A/hqdefault.jpg',
      width: 480,
      height: 360
    },
    standard: {
      url: 'https://i.ytimg.com/vi/gFcDolkdB9A/sddefault.jpg',
      width: 640,
      height: 480
    },
    maxres: {
      url: 'https://i.ytimg.com/vi/gFcDolkdB9A/maxresdefault.jpg',
      width: 1280,
      height: 720
    }
  },
2blo commented 1 year ago

undefined user id "dont use isReady to conditionally render on server" wanted behavior:

trpc with ssprops id should be undefined, fir SEO

ssr for trpc:

fuck it, the error only appears in dev anyway

conclusion

  1. trpc should not return "empty" thumbnails
  2. impossible call trpc inside use effect? at least with useQuery
  3. cannot call useQuery conditionally
  4. should probably not give "default"-id
  5. we shouldnt ssr user specific posts, but the "scaffold" should be - dont know if we do this currently,
2blo commented 1 year ago

delete post

invalidate does not work as it should yet: "If the query is currently being rendered via useQuery or related hooks, it will also be refetched in the background"

worked by calling all2.refetch(); in onsuccess

2blo commented 1 year ago

modal issue

solution: put modal as variable in dropdown to access state.