#๐พ-core-development
1 messages ยท Page 15 of 1
suggestion```
const existingPlugins: Record<string, number> = {};
Vencord_existingPlugins[plugin.name] = existingPlugins[plugin.name] ?? dateNow;
goofy aaa
xd
@tropic wagon reopend
i explained to ven that same day
but i find it kinda boring that i have to ping him two billion times to check it out i didn't mean to close it i just deleted my fork to go back to main repo
oh ok
as im working on my own discord mod so i don't really work om vencord anymore xd
Ultimacord
basically sets are not good as they require a reference which is wacky
i already suggested to u on discord ages ago to use Maps

lol didn't see that
Maps good
oh my god what did i open my vscode to
bruhhhh
lmfao
my mod has plugin loading from urls now

noice
i will load while (true) alert("h")
What about cors
discord cors?
just dont have cors problems
cors stink
i have alot of concerns still though
because the plugin is evaluated i feel thats extremely insecure
well it is
what i can do for updates is hash the plugin and alert user when it changes
this way at least the plugin url won't suddenly update without ur notice
you can just pin commits
https://github.com/Vendicated/Vencord/blob/4fc41c8c0b1acf5f161a3589f9ad02edb17ebb3b/LICENSE instead of https://raw.githubusercontent.com/Vendicated/Vencord/main/LICENSE
imagine some used some paste bin plugin
and suddenly that paatebin is updated to token stealer or sth
kemo but pls finish this plugin
i mean pastebin url*
I should just replace the moyai mp3 one day for a laugh
replace it with a fart or something
i would contrib but i have no idea how maps even work
bro on god its done ๐ญ
@austere talon should i contrib usage of Maps
nah i don't wanna move to maps my plugin works fine ive been using it on desktop om vencord and on web using my discord mod lul
you're loading vencord plugins from urls?
my plugins ported to my discord mod
@austere talon just merg pr because kemo deleted his fork and then change it to maps ig
or i can change it to maps if ur lazy
ah i see
well they're pretty close cuz i did alot of stuff the same way as vencord i hope u don't mind that or call it palagrism
vencord vs ultimacord (might change the name)
@plugins.define
xd
ts doesn't havs macros like cpp so i had to find a way
what does that do
i originally didn't have name field and i used the class name but i had to put it back so i can minify
pushes the plugin object to the plugins set
that's really cursed lmao
wait then why do u even export it
you could just use inheritance for this btw
class Plugin {
constructor() {
plugins.push(this)
}
}
export new class QuickMention extends Plugin {}
i have some wack code im retarded
i exporrted it so ts can eat dick adnd stop crying that the class is not used

You will explod
i won't
i will explode
ultimacord better ur just hater
this is basically what if vencord was written by a retard
Proof? 

So me
Can't say I wouldn't of done the same ๐
yeah this project is horrible technically and i will feel ashamed when i open source it
but it's just something im doing to learn
To me the code is great

it still doesn't even compile for desktop ๐ญ
It'll work eventually 
Just gotta bash your head against the wall a few times and it'll come to you
Does for me anyways 
thanks for believing in my skidded vencord clone 

It shouldn't be that different right
You just need a way to inject
not even that

problem lies that vite literally just build a userscript
Aw hell nah
the current build scripts and workflow is really smooth for development process
and way easier than restarted deaktop discord
Afterwards it'll explod
so when i have at least something my friends can use or try ill start making a different build flow for desktop
still wanna add arRPC and try porting it to armcord tho
ill add a big note to use vencord and only use this if i wanna explode 

dont mind me
I would have done a lot of these myself but you didn't give me permissions to do edits
Please wrap this in an errorboundary to prevent crashes
Bad Patches
None
Bad Starts
None
Discord Errors
Failed to load resource: the server responded with a status of 404 () ```
^ untested, since I can't run/build the program with my shitty ass IGPU
bruh, I thought is weird the whole code are in red indent 
guhhh why go in webstorm
doesn't jetbrains have an ide specifically for go
they do
goland
Actually, it's "more than just a go ide"
ky s
you too <3
why would somebody who likely never wrote go install a new ide for a single line change
u could if u wanted to but dw about it
thanks!
some shiki codeblock stuff
run auto fix on it or add semicolons manually
Then it tells me to remove semicolons
I added to there too
It continued complaining
I will look again once I get home
@austere talon is hljs as devdependency chill
I see
go ahead, as long as it's not massive
ok
I thought hljs was huge
we had electron for typings but it's more than 200mb so I extracted the types into my own package and used those instesd
ven loves me spamming ctrl s
lmao
how does that even happen
that shouldn't happen
yes that's what I'm saying
you have some bug I think
hljs is 2M
yeah that's fine then
Well see full size with dependencies and all, not just main package
eslint moment
but as long as its not massive it's okay
make a temp folder
npm i thepkg
then see how big the node modules folder is
but it has 0 dependencies so it's gonna be fine just do it

me when i find that ouy
Quick overview of out of scope changes:
- added an optional
pathsparam touseSettingsso u can subscribe to specific keys - new csp parsing
- add [module type](https://github.com/Vendicated/Vencord/pull/267/files#diff-884a2fb17edc1...
how about you commit all those suggestions instead of me copying them one by one and pushing them ๐
I would have done a lot of these myself but you didn't give me permissions to do edits
I would have done a lot of these myself but you didn't give me permissions to do edits
?
You can also just press the commit suggestion button you know
they should ๐ค
@austere talon i marked the pr as ready whenev u want to review
love shiki cb
dance emoji
@spark cove port better spotiembeds? please
yea thats next
good good
i wanted to get this one out of the way cus its got all the complex stuff
I have no clue why I didn't do this right from the start and why this helper even was in the util folder instead of webpack
that sounds fun
i think if u
๐
add the findlazy import line
after every utils/misc import
eslint will auto sort ur imports
including removing unused
real
done
fakeNitro ๐คจ
this is why we have ci
move ci to build commit hook
pre commit u mean?
yea
nah
but it was a joke
pre commit hooks are pain cause its annoying
joke is you cannot dev
there xd
i only tested if esbuild worked
but obviously it doesnt check function level
speedy type checker when
have u kept up with this https://github.com/dudykr/stc
yea no he's farish from it
but its getting better over time its cool to see little extra_error number go down https://stc.dudy.dev/
there's also a cpp one
type support for throw
https://github.com/microsoft/TypeScript/pull/50996
https://github.com/microsoft/vscode/issues/124280
GitHub
This PR aims to add an exhaustive case completion in the completions provided inside a switch statement.
The exhaustive case completion aims to provide all the possible case clauses that are not al...
these are promising
tbf ive just been using esbuild for the latter
tsrun() {
node -e "$(esbuild "$1" --platform=node)"
}
this works fine
fair
looks good now? https://github.com/Vendicated/Vencord/pull/268
can i skid ur proxy lazy function
yea
yea its dead noiw
lmao
whoReacted
yeah auto importing sometimes shits itself
oh sick
maybe we could use namespace imports
import { React } from "@webpack/common";
i think esbuild natively supports those
it does
but wouldnt be hard to make from scratch either
like this right
seems to work out of the box with esbuild
massive
banger
@austere talon for insane performance there's an esbuild banner Option set it to prepend "use strict" before each file
it does that by default
now how do i make esbuild enforce use of these
i think its respecting tsconfig's strict config
i forgot about this mess
it's an eslint rule that bans import from utils index
cause that kept causing issues
(circular imports)
oh lol
cause if u import from here it causes all these to be imported which in turn import webpack and settings
so if you import this file from webpack/settings it will be circular which causes things to be undefined

does eslint have per-rule include
bro i swear vencord functions on abstractiona and wrappers
it does
that just are very generous in assuming something will work some sort of a way
because yes discor
scary imge
looking painful
esbuild shit itself for me when there's circular imports
okay done
circular imports are very bad
it doesn't even say anything it legit throws an error about a file that it doesn't compile ๐
i use esbuild to compile plugins folder to a strings then write those to plugins.ts and esbuild was throwing an error about plugins.ts being an invalid file ๐
at first i thought i made it compile subfolders but it turns out it's ciruclar imports
lmfao

lolol
a couple days ago i made a version of shiki that compiles the whole webworker to a string
with an esbuild plugin
just JSON.stringified
Json stringify is so based
it would have been a bit funnier to util.inspect it
terrifying
lmao
yea
mmm
its ok i barely touched anything
now how do i enforce use of these over relative imports
: O O@!#
does this work lmfao
mmm deprecated
why does it need 71 deps 
there was 1 line of conflict lets go
FUCK
/ doesnt support tsconfig paths
**get-alias-map.js: **
const getIn = require("./get-in");
const { resolve } = require("path");
module.exports = function getAliasMap(context) {
const rootPath = context.getCwd();
const aliasSettings = getIn(context.settings, "import/resolver.alias");
if (!aliasSettings) {
return {};
}
const aliasMatrix = Array.isArray(aliasSettings)
? aliasSettings
: aliasSettings.map;
return aliasMatrix.reduce((aliasMap, [alias, path]) => {
aliasMap[alias] = resolve(rootPath, path);
return aliasMap;
}, {});
};
what what
oh i also need https://www.npmjs.com/package/eslint-import-resolver-alias ?
npm
a simple Node behavior import resolution plugin for eslint-plugin-import, supporting module alias.. Latest version: 1.1.2, last published: 4 years ago. Start using eslint-import-resolver-alias in your project by running npm i eslint-import-resolver-alias. There are 279 other projects in the npm registry using eslint-import-resolver-alias.
my brain
noice
is works
ayy
thats actualy nice
auto fix works
yay my ctrl + s will enjoy
what if pnpm patch
ig?
oh yea
doesnt work
**no-relative.js: **Line 43
if (!/^(\.?\.\/)/.test(importPath)) {
pnpm patch above that line like if (/^\.\/[^\/]$/.test(importPath)) return
wouldn't it be
if (!/^(\.\.\/)/.test(importPath)) {
just make the second dot not optional
lmao
my monitor is dying
i was trying to prevent something like ./blah/eh/webpack/a.ts
this works
lets go
god i love git cherry pick
looks good right?
you love packages with three million deps
should have probably tested
dw we good it works
accidently posted in wrong channel lol
take care 
O
Shiki is for types
Core has no depa
Well eventwmitter e3
Actualy
It's no hundle
If u look in uh
Dependencies ts
There is unpkg
Shiki worker uses shiki
But I needed the types still on clientside
oh
Core has like general ipc stuff
Shiki is shiki but without a lot of builtins + some optimizations
And shiki worker is the worker part yea
Shiki worker is like one small ts file
i was confused cause it bloated the bundle a bunch
but that's ur json
the json is like 20kb
cant u fetch the json from cdn too?
thanks!!
Ignore fornow
but also take ur time
Ya Yaya
and sorry for being like really annoying about bundle size but if I'm not the bundle size will explode lmao

Not annoying I just didn't know
i wanna optimise the settings proxy
cause rn it's like making and destroying multiple objects whenever u acess settings
lots of gc
this should work probably?
seems to work
holy shit so many
wait wtf is going on here
oh found a bug
wha
i mean why is there both plugins/Foo and plugins.Foo
but i realised it was a bug in the code
Are you discriminating?
rule #2, [...]do not discriminate others[...]
Ven has broken two rules so far
how did that even get in there
you can just say no lol
Need to figure out a good way to do this in the userscript and also let fridge know he needs to update the loader
Issue: The updater will not download renderer.css. Need to find a fix for this / implement a temporary hack that will download the renderer.css file if it doesn't exist
kk
should i merge for now then or nah
i can help u with the props whenever
(no rush btw, i just wanted an answer so i know whats the status)
we should make some css variable api to go along with this
im not sure what the best way to do that would be
owo
how
media doesn't serve them usually mmm
/stickers png does

I get the feeling Math.random() is really shit xd
not that it matters for this but
it tends to give repeated results a lot
I mean it's a 50 50 chance
it's not too unlikely to get multiple similar results in a row

anyway if u want true random bytes crypto exists

ehh
optimize Math.random() to just 1
it's not exactly that important xd
i will merge it now because shiggy deserves to be in vencord
the shiggy wiggy



love 

oh yea @austere talon
i was gonna send u this, this is the worker file https://github.com/Vap0r1ze/vapcord/blob/main/packages/shiki-worker/src/index.ts
**index.ts: **
/// <reference lib="webworker" />
import type {
Highlighter,
ILanguageRegistration as Lang,
IShikiTheme as Theme,
} from '@vap/shiki'
import * as shiki from '@vap/shiki'
import { createWorkerHost } from '@vap/core/ipc'
let highlighter: Highlighter
const spec = {
async setOnigasm({ wasm }: { wasm: string | ArrayBuffer }) {
shiki.setWasm(wasm)
},
async setHighlighter({ theme, langs }: { theme: Theme; langs: Lang[] }) {
highlighter = await shiki.getHighlighter({ theme, langs })
},
async loadTheme({ theme }: { theme: string | Theme }) {
await highlighter.loadTheme(theme)
},
async getTheme({ theme }: { theme: string }) {
return { themeData: JSON.stringify(highlighter.getTheme(theme)) }
},
async loadLanguage({ lang }: { lang: Lang }) {
await highlighter.loadLanguage(lang)
},
async codeToThemedTokens({
code,
lang,
theme,
}: {
code: string
lang?: string
theme?: string
}) {
return await highlighter.codeToThemedTokens(code, lang, theme)
},
} as const
createWorkerHost('shiki-host', spec)
export type ShikiSpec = typeof spec
waoh
ye dw
@austere talon are u getting this
eh no need
Fix background colour for plugin card & settings when having a custom theme.
Before
After
Adds a little indicator on the server list for online friends and/or server count
are you sure this isn't just your theme being bad? it works fine for me and the card is consistent with that in the streamer mode settings page
I suggest you modify your theme to support the missing css variables. The variables used have been kept consistent with other settings pages.
maybe add a comment explaining what type 1 is
would be cool to add ids to these so they're more easily themeable! #vc-guildcount and #vc-friendcount for example
are you sure this isn't just your theme being bad? it works fine for me and the card is consistent with that in the streamer mode settings page
I'm using Discord's theme experiment feature thing
The experiment is exactly that - an experiment. I doubt its complete yet.
Thank you though, will keep this in mind to test once/if Discord chooses to release this feature.
it works as expected for me, even with the experiment. the dono and button cards are themed correctly and the plugin cards while being ugly are themed the same as the highlight which is the expected behaviour


Bad Patches
None
Bad Starts
None
Discord Errors
Failed to load resource: the server responded with a status of 404 () ```
New out of scope change:
- added support for a "--sourcemap" flag in the
buildWebscript
@spark cove
i was just interested in the better code blocks
๐ญ
same
really weird
i even deleted my settings file
so that aint the issue
i also fully restarted discord
my brain wasnt processing the imaging u sent
it just did tho
so let me read some cod
can u reload and retry
rebuild
idk
just at least once
because it looks like that issue would happen with every plugin that uses settings
did it again, same issue
well, since the settings can be accessed when you are patching, i doubt thats the issue
im backing up my css
nah it would be an issue
patching happens after all plugins are initialized
top level of shikiCodeblocks/index.ts happens WHILE plugins are being initialized
or rather before they are
so plugins will be undefined in that time cus transpiler moment
commonjs moment
circular import moment
took me a few tries to understand what im talking about but im there i think
@quaint sapphire pull and try
:D D D D D
In a bit
kk
works!
wew
**Vencord.ts: **Lines 40-77
async function init() {
await onceReady;
startAllPlugins();
Components = await import("./components");
if (!IS_WEB) {
try {
const isOutdated = await checkForUpdates();
if (isOutdated && Settings.notifyAboutUpdates)
setTimeout(() => {
showNotice(
"A Vencord update is available!",
"View Update",
() => {
popNotice();
Router.open("VencordUpdater");
}
);
}, 10000);
} catch (err) {
UpdateLogger.error("Failed to check for updates", err);
}
}
if (IS_DEV) {
const pendingPatches = patches.filter(p => !p.all && p.predicate?.() !== false);
if (pendingPatches.length)
PMLogger.warn(
"Webpack has finished initialising, but some patches haven't been applied yet.",
"This might be expected since some Modules are lazy loaded, but please verify",
"that all plugins are working as intended.",
"You are seeing this warning because this is a Development build of Vencord.",
"\nThe following patches have not been applied:",
"\n\n" + pendingPatches.map(p => `${p.plugin}: ${p.find}`).join("\n")
);
}
}
New out of scope change:
- added support for a "--sourcemap" flag in the
buildWebscript
you can just run with the --watch flag to achieve the same result plus no minification
@spark cove
this happens when you put const settings = Settings.plugins.MyPlugin on the top level
you can't do that
yes exactly
I haven't found a way to fix it
armcord does not have a spellchecker?
should i change the tsconfig ?
I think they're talking about hasOwn
(i assume it is a spellchecker issue)
ya
yes
hasOwn
i also assumed that
13??!?!@
you love discord
how much different is it from hasOwnProperty?
kile
canary is at 17
kill
it's the same
just nicer syntax
bruh
yea
meow
i dont have to grab it from a prototype
Object.hasOwn(foo, "bar")
Object.prototype.hasOwnProperty.call(foo, "bar")
it's just a bit of sugar for the second
Object.prototype.hasOwnProperty*
foo?
bloat

if (Object.hasOwnProperty.call(languages, idOrAlias)) return languages[idOrAlias];
this is amazing
uhh, I don't really want electron to be globally installed
why would electron be globally installed
thats what a one-click installer would do
i was talking about electron 22 w/o armcord
use armcord 
no
ah
and electron 22 w/o armcord won't install electron globally either
you download latest binaries zip from github and extract in your discord folder, overriding all the files that conflict
i really dont feel like doing that shit rn
its about the mentality
when using linux i go way beyond
when using windows i just let it be
mentality moment
sad that this doesn't get highlighted
well, makes sense
but still
@spark cove is it possible to also apply it to file previews?
yeah that'd be cool
file previews have the file extensions, which should prove useful for detecting the language
well discord does it for me
thats how hljs knows the lang
but yea sounds like a good idea for a bit later
im gonna do some final splitting of the Highlighter file
and ask for review so i can work on ArmCord audio video screensharing
@austere talon ok hi i can haz review?

i should probably answer this
and the reason i didnt do it until now is because i think the automod embed just looks better. messages would be nicer because i dont have to parse images/videos/etc. myself. maybe add embedding actual message components as a fallback in case there's something not showable in the automod embed? or just go the cleaner way of only having an embedded message component
dowoas
doas my beloved
it took so long !!!1!
this is objective indisputable proof that windows is better !!
580f19f continue unpatch despite errors - Vendicated
[Vendicated/VencordInstaller] New tag created: v1\.0\.5
Windows don't take 3 trillion years to build challenge (failed)
@KaiserBloo "got the following error" = crash? Black screen? Or what exactly happens
@KaiserBloo "got the following error" = crash? Black screen? Or what exactly happens
just nothing happens, that error is spat out in the terminal and no window appears or anything
okay thanks!
It's hard for me to test wayland stuffs cause I use X11 but I'll spin up some wayland session soon and try to fix
currently only user mentions and typing colored
todo:
- make typing users work with i18n
- vc users
- slate mentions
- statuses
- popouts
heh


finally vencord is getting remote code execution
bipolar girl
hey man
๐
once i edited i realised it's not actually that funny
i forgive you
insane
ven is kind of person that would rewind time because it was not funny
if he could
Fr fr
baaad
https://youtu.be/yESFRV-FKuI real men listen this
Anime - Initial D
Song - Heartbeat
Artist - Nathalie
All rights and credits go to their respective owners.
Turn off your buttplug guhhh
too comfy in bed
HORROR YOU INIRONICALLY USE LAPTOP ON BATTERY
guh im in bed
No outlet next to bed?
yes but
charger is far away
my mum would kill me
someone from upstairs will call police
bad idea
Skill issue
When my parents sleep they're near impossible to wake up
I can't fucking English
would be cool to have a setting to show more useful info like Tom, Jerry and 7 more people are typing
SLEEP
Same and 3am 
yop NOW
bring me charger before u sleep
Jqjab
Bad Patches
None
Bad Starts
None
Discord Errors
Failed to load resource: the server responded with a status of 404 () ```
I think I fixed it, could you please test if this binary works?
VencordInstaller.zip
cc47f8c Fix wayland support, add wayland release - Vendicated
[Vendicated/VencordInstaller] New tag created: v1\.0\.6
mfw linux building two different binaries is way faster than windows building just one
we becoming ultra zoomer
doas and wayland ๐ช๐
soon sudo and x11 support will be dropped ๐ฆต
YOPPPP
it was my first anime i watched
long long ago
doas smh
sudo for people who are too stupid to understand how sudo works
lmao yeah
It's not like an entire gigabyte so why should I care, I'm not some gentoo user who needs everything to be minimalist
i want slim sudo
i am minimalist
you love CVE-2021-3156 & CVE-2019-14287 & CVE-2016-7076
The point is that the codebase is a lot smaller and modern
sudo is riddled with CVEs waiting to be found
Dunno why they didn't just re-implement sudo
Why did it have to be incompatible?
then it wouldn't be simple anymore
I'm talking about the command line args
It could have been a drop in replacement
Having feature parity does not mean the code will be complex
^ clueless about sudo's configuration system
I personally never had a use case for an arg other than --user
why is this https://man.archlinux.org/man/sudoers.5.en
and I suppose env vars, you have to use sh -c or the -s option
Sounds like a skill issue
just map it doas to sudo???
so when you run the word sudo
its actually doas
then everything work
That's not how it works
Lol
It will work if you don't use any CLI arg or ENV
Which is very limited
i never used sudo args
Same. Just saying it's a thing that some people need 
sudo vs doas is silly
Big code = many cves
doesn't really make a lot of sense
you should probably stop using an operating system or browser as well then

sudo is the de facto standard, usually the people using doas for "security" are people using Linux on their home pc where it doesn't even matter to have vulnerable software (cause noone is gonna exploit it)
(not saying doas is bad, I think it's neat, but it's too limited for me, mainly the lack of environment variable support sucks)
unless I break into their houses
actually if I break into their houses since their hard drive is not encrypted I probably dont even need to hack it
if you use doas on your home pc for security then you should also encrypt your disks, disable the root user altogether, and so on

"disable the root user" what
And I do have full disk encryption 
They mean getting rid of its password, I think
a lot of servers do this by default
you can only use sudo or sudo su
authorize what
sudo uses your user's password
watafak
that's why you can even use sudo for a root account that doesn't have a password
you can also configure the sudoers config to not ask for a password, if you'd wanted
If you tried to just su root without sudo, it'd ask for root's password then (which you obviously wouldn't have if it simply didn't exist)
this is why you'd sudo su
you can disable password for sudo in sudoers
remove its password and you can't log into it at all
or change its login shell to nologin (bad idea lmao)
based
i encrypted vens files
NO
"decrypt one file for free!"
Thanks for the pr! Other than the feedback below, a bit nitpicky but could you please use interfaces instead of types (where applicable) and actual named functions over arrow function assignments for consistency?
same as below, add a key please
themeUrl ||= themeUrls[0];
you can use the useAwaiter utility instead! (well it doesn't have the deps argument but feel free to add it
cool utilities, maybe add these to the general utils? At least quickReply can make use of the top function
could you show the difference please
Nvm, just tested! Looks better, thank you!
i just realized how stupid my last (now deleted) message was
anyway, embedding the message component actually doesnt look that much worse
well, wont look that much worse after i unfuck the font
consts are in snake case, but they are also in capital case, aka CONST_CASE
iirc this is a C/C++ and Python thing
Just so you know, it appears that discord already has lodash bundled, so you can just do

Instead of the ugly Object.prototype.hasOwnProperty.call({cat: 5}, "cat");
#234 adds the types and declares that it is globally accessible (for typescript to not complain)
that'd still be pretty ugly with window._.isIn. The cleanest solution would be to polyfill Object.hasOwn, I personally wouldn't mind adding super simple polyfills like this one
how would it prevent bugs? keys are only for rendering optimization...
instead of re-rendering the entire list of elements, it just re-renders the specific items
titleToWords feels wrong, maybe titleCaseToWords, but that is too long
this is not true. If you omit keys, React has no way of knowing which element exactly is which, which will in the worst case lead to mixed up states (as was the case in the old plugin page where if you searched something the switch state got messed up). if it works as expected, you were simply lucky. It also technically shouldn't matter if the rendered items are stable and never change but its still best practice to add them anyway
state? what state? they don't have individual state, unless you are referring to smth else
that'd still be pretty ugly with
window._.isIn.
That is up for debate tbh
If the values in lines ever changes, the contents of the elements returned from the map can get mixed up badly. In this case "state" isn't referring to things like useState, but just the state of the components in general (props, children, etc)
pointless argument just add keys xd
from what I see, lines is assigned to only once during the function's lifetime
(well, the try/catch could count as two assignments)
the component would fully re-render if the lines change
PS: In case I am THAT blind, please do point it out
huskhuskhuskhuskhuskhuskhusk
it's just good practice to always use a key on iterated elements

yes but based on what? keys using the index are pointless
and the local variable line is actually a JSX component
cant use that as a key
what would you use for the key?
lines.map((line: JSX.Element, i: int) => { /*...*/ })
like, really
the solution is to not do a double map
make the first map build the full finished ui and add keys there
I do agree that the code is split in weird ways
but do you perhaps mean to use the entire line (the actual string) as the key?
a checksum would also work, but that is overkill lol
you can just use the line if that's the only option yes






