Skip to content

Commit 079174f

Browse files
authored
Merge pull request #10 from CryptCollab/feature/JoinExistingDocuments
Feature/join existing documents
2 parents 97ed453 + 89a2116 commit 079174f

12 files changed

Lines changed: 454 additions & 112 deletions

File tree

package-lock.json

Lines changed: 237 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export default function App() {
2424

2525

2626
useEffect(() => {
27-
console.log("loading:", loading);
2827
if (loading) {
2928
refresh().then(() => { setLoading(false) });
3029
} else {

src/components/TextEditor.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ const MenuBar = ({ editor }) => {
212212
)
213213
}
214214
//console.log(TextStyle);
215-
const Tiptap = () => {
216-
useEffect(() => {
215+
const Tiptap = (props: { documentID: string; }) => {
216+
const documentID = props.documentID;
217+
useEffect(() => {
218+
socket.documentID = documentID;
217219
socket.connectHandler(document.ydoc);
218220
document.ydoc.on("update", socket.distributeDocumentUpdate);
219221

src/hooks/useRefreshToken.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export default function refreshUserData(): () => Promise<UserLoginDataState | nu
77

88
return async () => {
99
try {
10-
console.log("GETTING to http://localhost:8080/api/refresh");
1110

1211
const userData = await axios.get<UserLoginDataState>("http://localhost:8080/api/refresh", {
1312
withCredentials: true,
@@ -17,7 +16,6 @@ export default function refreshUserData(): () => Promise<UserLoginDataState | nu
1716
'Expires': '0',
1817
}
1918
});
20-
console.log("userData", userData.data);
2119
user.loginUser(userData.data);
2220
return userData.data;
2321
} catch (err) {

0 commit comments

Comments
 (0)