File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ Run `bun i @mezh-hq/react-seat-toolkit` to incorporate into your project <br/>
8888``` jsx
8989import React from ' react' ;
9090import SeatToolkit from ' @mezh-hq/react-seat-toolkit' ;
91+ import ' @mezh-hq/react-seat-toolkit/styles' ;
9192
9293const App = () => {
9394 const data = {
@@ -125,6 +126,7 @@ export default App;
125126``` jsx
126127import React from ' react' ;
127128import SeatToolkit from ' @mezh-hq/react-seat-toolkit' ;
129+ import ' @mezh-hq/react-seat-toolkit/styles' ;
128130
129131const App = () => {
130132 return (
Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ export const getWorkspaceHeight = () => {
1212
1313export const getWorkspaceCenterX = ( ) => {
1414 const workspaceContainer = document . getElementById ( ids . workspaceContainer ) ;
15+ if ( typeof window === "undefined" ) return 0 ;
1516 return window . innerWidth / 2 - ( workspaceContainer ?. offsetLeft ?? 0 ) - 8 ;
1617} ;
1718
1819export const getWorkspaceCenterY = ( ) => {
1920 const workspaceContainer = document . getElementById ( ids . workspaceContainer ) ;
21+ if ( typeof window === "undefined" ) return 0 ;
2022 return window . innerHeight / 2 - ( workspaceContainer ?. offsetTop ?? 0 ) ;
2123} ;
You can’t perform that action at this time.
0 commit comments