-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a616e1a
commit 273c4d3
Showing
7 changed files
with
49 additions
and
24 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
VITE_WS_URL="ws://localhost:1234/ws" | ||
VITE_API_URL="http://localhost:8080" | ||
VITE_LANGUAGE="en" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import Editor from "./components/Editor"; | ||
import "./App.css"; | ||
|
||
const { VITE_LANGUAGE } = import.meta.env; | ||
|
||
export default function App() { | ||
const urlParams = window.location.pathname.slice(1).split("/"); | ||
const roomId = urlParams[0] === "r" ? urlParams[1] : undefined; | ||
|
||
return ( | ||
<div className="tldraw"> | ||
<Editor roomId={roomId} /> | ||
<Editor roomId={roomId} language={VITE_LANGUAGE} /> | ||
</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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export type Settings = { | ||
roomId?: string; | ||
readOnly?: boolean; | ||
language?: string; | ||
}; | ||
|
||
export type Default = { | ||
language: string; | ||
}; | ||
|
||
export type Multiplayer = { | ||
roomId: string; | ||
language: string; | ||
}; |
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