Skip to content

Commit

Permalink
fix(movex-docs): 🐛 typings issues
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielCTroia committed Oct 12, 2024
1 parent c981e59 commit 82c425f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Action } from 'movex';
import { Action } from 'movex-core-util';
import { Color, ParticipantId } from './state';

export type ChatActions =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Action } from 'movex';
import { Action } from 'movex-core-util';
import { PlayerId, PlayerLabel, RPS } from './types';

export type Actions =
Expand Down
36 changes: 24 additions & 12 deletions apps/movex-docs/modules/home/game/Game.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { getRandomInt } from 'movex-core-util';
import { useMemo } from 'react';

const bkgColor = '#ffc300';
Expand All @@ -7,9 +6,14 @@ export const Game = () => {
const gameId = useMemo(() => String(Math.random()).slice(-8), []);

return (
<div className={`h-full flex w-full`} style={{
// backgroundColor: bkgColor,
}}>
<div
className={`h-full flex w-full`}
style={
{
// backgroundColor: bkgColor,
}
}
>
<div
className={`flex w-full`}
style={{
Expand All @@ -19,9 +23,11 @@ export const Game = () => {
>
<div
className="mx-auto max-w-[90rem] gap-2 pl-[max(env(safe-area-inset-left),1.5rem)] pr-[max(env(safe-area-inset-right),1.5rem)] pt-20 p-16"
style={{
// background: 'green',
}}
style={
{
// background: 'green',
}
}
>
<h1 className="text-6xl text-black font-bold">
Try Movex with a Game of
Expand All @@ -33,9 +39,11 @@ export const Game = () => {
</h1>
</div>

<div style={{
flex: .1,
}} />
<div
style={{
flex: 0.1,
}}
/>
<div
className="w-full flex"
style={{
Expand All @@ -44,11 +52,15 @@ export const Game = () => {
}}
>
<iframe
src={`http://localhost:4200/rps/${gameId}?user=a&backgroundColor=${encodeURIComponent(bkgColor)}`}
src={`http://localhost:4200/rps/${gameId}?user=a&backgroundColor=${encodeURIComponent(
bkgColor
)}`}
className="w-full h-full"
/>
<iframe
src={`http://localhost:4200/rps/${gameId}?user=b&backgroundColor=${encodeURIComponent(bkgColor)}`}
src={`http://localhost:4200/rps/${gameId}?user=b&backgroundColor=${encodeURIComponent(
bkgColor
)}`}
className="w-full h-full"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion libs/movex-core-util/src/lib/md5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function md5(s: any) {
c,
d,
h = [(b = 0x67452301), (c = 0xefcdab89), ~b, ~c],
words = [],
words: number[] = [],
j: any = unescape(encodeURI(s)) + '\x80',
a = j.length;

Expand Down
2 changes: 1 addition & 1 deletion libs/movex/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export {
isSameResourceIdentifier as isSameRid,
} from 'movex-core-util';

export { DispatchPublicFn as MovexDispatchAction } from './lib/dispatch';
export { type DispatchPublicFn as MovexDispatchAction } from './lib/dispatch';

0 comments on commit 82c425f

Please sign in to comment.