new sidebar and functionality to it, fixed problems with the style/cleanup #20

Merged
catxrin merged 2 commits from AC-32-1 into master 2024-01-05 08:06:07 -05:00
catxrin commented 2024-01-03 08:44:41 -05:00 (Migrated from github.com)
No description provided.
GameBear64 (Migrated from github.com) requested changes 2024-01-03 09:21:32 -05:00
GameBear64 (Migrated from github.com) left a comment

I want some changes but most are general questions, please write your replies.

I want some changes but most are general questions, please write your replies.
@ -19,16 +20,12 @@ export default function MediaSelect({ name, rules = {}, styles, label, ...rest }
alt=""
GameBear64 (Migrated from github.com) commented 2024-01-03 08:53:46 -05:00

Edit does nothing, please comment out

Edit does nothing, please comment out
@ -0,0 +1,7 @@
export default function Icon({ icon, styles, ...rest }) {
GameBear64 (Migrated from github.com) commented 2024-01-03 08:57:50 -05:00

can you pass {...rest} here so we dont have action we can just pass it onClick, onHover and whatever else we could need? Also fix all icons like that

can you pass `{...rest}` here so we dont have action we can just pass it onClick, onHover and whatever else we could need? Also fix all icons like that
GameBear64 (Migrated from github.com) commented 2024-01-03 08:50:18 -05:00

ignored

ignored
@ -0,0 +76,4 @@
</progress>
{(image?.mimetype?.includes('image') || image?.mimetype?.includes('video')) && image?.key && (
<img src={`http://localhost:3030/recourse/${image?.key}?size=250`} />
)}
GameBear64 (Migrated from github.com) commented 2024-01-03 08:59:56 -05:00

Have you checked the console? React sometimes throws errors when there is no alt element, even if its empty

Have you checked the console? React sometimes throws errors when there is no alt element, even if its empty
@ -0,0 +20,4 @@
placeholder="Search"
/>
{children}
GameBear64 (Migrated from github.com) commented 2024-01-03 09:06:50 -05:00

Is there a way to avoid this?

Is there a way to avoid this?
@ -0,0 +1,41 @@
import { useState } from 'react';
GameBear64 (Migrated from github.com) commented 2024-01-03 09:06:22 -05:00

Lets avoid inline ternaries and lets keep consistent with the rest of the code, see how its done at https://github.com/GameBear64/AmberCamp/pull/20/files#diff-85cac127b49b831531147573ef689fc5965cf32fa1dd9c2d1a5bed6d7c99f559R48-R52

    {pendingType === ContactType.Incoming && <ContactsList list={incoming} type="pending">{btns()}</ContactsList>}
   	{pendingType === ContactType.Outgoing && <ContactsList list={outgoing} type="pending">{btns()} </ContactsList>}
Lets avoid inline ternaries and lets keep consistent with the rest of the code, see how its done at https://github.com/GameBear64/AmberCamp/pull/20/files#diff-85cac127b49b831531147573ef689fc5965cf32fa1dd9c2d1a5bed6d7c99f559R48-R52 ```suggestion {pendingType === ContactType.Incoming && <ContactsList list={incoming} type="pending">{btns()}</ContactsList>} {pendingType === ContactType.Outgoing && <ContactsList list={outgoing} type="pending">{btns()} </ContactsList>} ```
@ -0,0 +7,4 @@
export default function Pending({ incoming, outgoing, type }) {
const [pendingType, setPendingType] = useState(type);
const btns = () => (
GameBear64 (Migrated from github.com) commented 2024-01-03 09:06:34 -05:00

Lets take this out to a seperate component

Lets take this out to a seperate component
@ -0,0 +1,99 @@
import { useEffect, useState } from 'react';
GameBear64 (Migrated from github.com) commented 2024-01-03 09:08:54 -05:00

Where did "updateDescription" go? Well whatever you can put it back but inside the component since thats the only place its used

Where did "updateDescription" go? Well whatever you can put it back but inside the component since thats the only place its used
@ -0,0 +75,4 @@
backgroundImage: userInfo?.background ? `url('http://localhost:3030/recourse/${userInfo?.background}')` : '',
}}>
<section className="relative mx-4 flex flex-row pt-28 ">
<div className="relative mx-2.5 inline-block h-44 overflow-hidden rounded-[50%] border-4 border-solid border-white shadow-md">
GameBear64 (Migrated from github.com) commented 2024-01-03 09:11:54 -05:00

Does this return undefined or does it throw an error when userInfo?.createdAt is missing

Does this return undefined or does it throw an error when `userInfo?.createdAt` is missing
@ -0,0 +61,4 @@
<div className="float-left mb-4 flex w-full flex-wrap gap-2 font-semibold ">
{userInfo.status == 'Strangers' && (
<button className="btn-blue" onClick={add}>
Add friend
GameBear64 (Migrated from github.com) commented 2024-01-03 09:12:53 -05:00

Oh no.. I hope we dont end up with 27 duferent button color classes

Oh no.. I hope we dont end up with 27 duferent button color classes
@ -0,0 +12,4 @@
import { getUser } from './endpoints';
export default function NotesSection({ id, userInfo, setUserInfo }) {
const [editNote, setEditNote] = useState('');
GameBear64 (Migrated from github.com) commented 2024-01-03 09:16:07 -05:00

refetch seemed ok, that way we dont pass around setUserInfo, also are we certain we only do setUserInfo after we get the user?

refetch seemed ok, that way we dont pass around `setUserInfo`, also are we certain we only do setUserInfo after we get the user?
catxrin (Migrated from github.com) reviewed 2024-01-03 09:27:47 -05:00
@ -0,0 +75,4 @@
backgroundImage: userInfo?.background ? `url('http://localhost:3030/recourse/${userInfo?.background}')` : '',
}}>
<section className="relative mx-4 flex flex-row pt-28 ">
<div className="relative mx-2.5 inline-block h-44 overflow-hidden rounded-[50%] border-4 border-solid border-white shadow-md">
catxrin (Migrated from github.com) commented 2024-01-03 09:27:47 -05:00

this will be fixed later, when i start to work on the mobile version. Please, ignore it for now.

this will be fixed later, when i start to work on the mobile version. Please, ignore it for now.
catxrin (Migrated from github.com) reviewed 2024-01-03 09:28:41 -05:00
@ -0,0 +12,4 @@
import { getUser } from './endpoints';
export default function NotesSection({ id, userInfo, setUserInfo }) {
const [editNote, setEditNote] = useState('');
catxrin (Migrated from github.com) commented 2024-01-03 09:28:41 -05:00

refetch didn't work, that's why i had to do it this way.

refetch didn't work, that's why i had to do it this way.
catxrin (Migrated from github.com) reviewed 2024-01-03 09:30:58 -05:00
@ -0,0 +76,4 @@
</progress>
{(image?.mimetype?.includes('image') || image?.mimetype?.includes('video')) && image?.key && (
<img src={`http://localhost:3030/recourse/${image?.key}?size=250`} />
)}
catxrin (Migrated from github.com) commented 2024-01-03 09:30:58 -05:00

No errors here, i'll put it back.

No errors here, i'll put it back.
GameBear64 (Migrated from github.com) reviewed 2024-01-03 14:00:48 -05:00
@ -0,0 +76,4 @@
</progress>
{(image?.mimetype?.includes('image') || image?.mimetype?.includes('video')) && image?.key && (
<img src={`http://localhost:3030/recourse/${image?.key}?size=250`} />
)}
GameBear64 (Migrated from github.com) commented 2024-01-03 14:00:48 -05:00

if no errors, no neec to put it back, thanks for checking

if no errors, no neec to put it back, thanks for checking
GameBear64 (Migrated from github.com) approved these changes 2024-01-05 08:02:47 -05:00
GameBear64 (Migrated from github.com) left a comment

Good job

Good job
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GamBar/AmberCamp!20
No description provided.