-
Notifications
You must be signed in to change notification settings - Fork 2
feat: custom users tab #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a matching package.json version bump. do we not have biome as a dev dependency?
@@ -0,0 +1 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty file?
"experimentalScannerIgnores": [ | ||
"src/client/gen/types.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is what we want to use here. The docs say the new replacement for files.ignore
is actually...
{
"files": {
"include": ["!src/client/gen/types.ts"]
}
}
(note the !
in there)
@@ -30,46 +30,35 @@ | |||
"level": "off" | |||
}, | |||
"noParameterAssign": { | |||
"level": "off" | |||
"level": "off", | |||
"options": {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels weird to specify options
for "off"
}, | ||
"useDefaultParameterLast": { | ||
"level": "off" | ||
}, | ||
"useSelfClosingElements": { | ||
"level": "off" | ||
"level": "off", | ||
"options": {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -101,6 +84,14 @@ export const App = () => { | |||
); | |||
}; | |||
|
|||
useEffect(() => { | |||
const newCurrentUser = users.find((u) => u.id === currentUser.id); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mega nit
const selectedMissing = !users.some( | ||
(owner) => currentUser.id === owner.id, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const selectedMissing = !users.some( | |
(owner) => currentUser.id === owner.id, | |
); | |
const selectedMissing = users.every((owner) => currentUser.id !== owner.id); |
these should be equivalent, but this seems a tiny bit clearer to me
{users.map((owner, index) => ( | ||
<SelectItem value={owner.id} key={index}> | ||
{owner.full_name || owner.name} | ||
</SelectItem> | ||
))} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean currentUser
gets shown twice?
@@ -60,7 +61,10 @@ app.get("/parameters/:shareId?/:example?", async (c, next) => { | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<script type="module">{`window.CODE = ${JSON.stringify(exampleCode)}`}</script> | |||
<script type="module">{`window.CODE = ${JSON.stringify(codeAndUsers.code)}`}</script> | |||
{codeAndUsers.users ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could probably be an &&
, since the "else" here isn't anything important.
@@ -0,0 +1,21 @@ | |||
export const downloadData = (data: unknown, fileName: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love how janky the web platform is. thanks for moving it out into a function. 😄
Closes #40