Skip to content
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

38985206: 403 error if user have no access to channel #131

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

d9m0n4
Copy link
Contributor

@d9m0n4 d9m0n4 commented Sep 18, 2024

No description provided.

Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
xieffect ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 6:50pm


const isLogin = useMainSt((state) => state.isLogin);

const pathname = usePathname();
const router = useRouter();
const getUrlWithParams = useGetUrlWithParams();

useEffect(() => {
const channelId = Number(params['channel-id']);
if (channelId && !channels?.some(({ id }) => id === channelId)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему бы не использовать arr.includes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

там как будто больше когда получается 😃

@unknownproperty unknownproperty merged commit 7373265 into staging Sep 19, 2024
6 checks passed
@unknownproperty unknownproperty deleted the 38985206 branch September 19, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants