Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tnfAngel committed Apr 16, 2024
1 parent ddf96e7 commit 86e5c18
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/app/guilds/[guildId]/[channelId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { useDispatch } from 'react-redux';

export default function SelectedGuildChannelPage({
params
}: {
}: Readonly<{
params: { guildId: string; channelId: string };
}) {
}>) {
const { guildId, channelId } = params;

const dispatch = useDispatch();
Expand Down
8 changes: 3 additions & 5 deletions src/app/guilds/[guildId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
'use client';

import GuildScreen from '@/components/screens/GuildScreen';
import { setActivePage, setSelectedChannel, setSelectedGuild } from '@/store/slices/selectionsSlice';
import { setActivePage, setSelectedGuild } from '@/store/slices/selectionsSlice';
import { Flex } from '@chakra-ui/react';
import { useDispatch } from 'react-redux';

export default function SelectedGuildPage({
params
}: {
}: Readonly<{
params: { guildId: string };
}) {
}>) {
const { guildId } = params;

const dispatch = useDispatch();

dispatch(setActivePage('guild'));
dispatch(setSelectedGuild({ guildId }));

console.log('setting cum');

return (
<Flex h='100%' w='100%'>
<GuildScreen />
Expand Down
6 changes: 3 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ChakraProvider, ColorModeScript, extendTheme } from '@chakra-ui/react';
import { Provider } from 'react-redux';
import { SWRConfig } from 'swr';
import { store } from '../store';
import '../styles/global.scss';
import '../styles/global.css';

const config = {
initialColorMode: 'dark',
Expand All @@ -19,9 +19,9 @@ const theme = extendTheme({ config, fonts });

export default function RootLayout({
children
}: {
}: Readonly<{
children: React.ReactNode;
}) {
}>) {
return (
<html lang='en'>
<head>
Expand Down
2 changes: 1 addition & 1 deletion src/components/screens/GuildChannelScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function GuildChannelScreen() {
const channel = channels.find((channel) => channel.id === selectedState.guilds[guild.id]);

if (!channel) {
console.log('Sending to friends (no channel) GuildchannelScren');
console.log('Sending to friends (no channel) GuildchannelScreen');

router.prefetch(`/guilds/${guild.id}`);
router.push(`/guilds/${guild.id}`);
Expand Down

0 comments on commit 86e5c18

Please sign in to comment.