-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from Iam2Jo/T2-101-feature/debugging-4
T2 101 feature/debugging 4
- Loading branch information
Showing
18 changed files
with
136 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React, { useEffect } from 'react'; | ||
import { Dormitory } from '@components/Dormitory'; | ||
import { MyChatting } from '@components/MyChatting'; | ||
import { Header } from '@components/Header'; | ||
|
||
export default function ClubChatting(props: any) { | ||
const decodeURL = decodeURIComponent(props.params.id); | ||
const id = decodeURL.split('&name=')[0]; | ||
const name = decodeURL.split('&name=')[1]; | ||
return ( | ||
<> | ||
<Header /> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
gap: '1rem', | ||
padding: '1rem', | ||
backgroundColor: '#1f1f1f', | ||
height: '100vh', | ||
}} | ||
> | ||
<MyChatting /> | ||
<Dormitory chatId={id} dormName={name} /> | ||
</div> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,13 @@ | ||
'use client'; | ||
|
||
import { useSearchParams } from 'next/navigation'; | ||
import { useState, useEffect } from 'react'; | ||
import { Dormitory } from '@components/Dormitory'; | ||
import { getFirebaseData } from '@hooks/useFireFetch'; | ||
import { set } from 'lodash'; | ||
|
||
const ClubChatting = () => { | ||
const params = useSearchParams(); | ||
// const queryString = params.get('id'); | ||
|
||
// const id = queryString.split('&name=')[0]; | ||
// const name = queryString.split('&name=')[1]; | ||
|
||
const id = params.get('id'); | ||
const name = params.get('name'); | ||
|
||
useEffect(() => { | ||
console.log('id', id); | ||
console.log('name', name); | ||
}, [id, name]); | ||
|
||
const ClubChatting = (id: any, name: any) => { | ||
if (!id || !name) { | ||
return <div style={{ backgroundColor: 'white' }}>로딩중...</div>; | ||
} | ||
|
||
return <Dormitory chatId={id} dormName={name} />; | ||
}; | ||
|
||
export default ClubChatting; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.