Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix imports #10

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/app/playview/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function PlayView({ params }: { params: { id: string } }) {
const dispatch = useDispatch();
const selectWorkoutSession = (state: RootState) => state.workout;
const workoutSession = useSelector(selectWorkoutSession);
const web5state = useSelector((state: Web5State) => state.web5);
const web5state = useSelector((state: Web5State) => state);
const workoutManager = WorkoutManagerSingleton.getInstance();
workoutManager.setDispatcher(dispatch);

Expand Down Expand Up @@ -56,7 +56,6 @@ export default function PlayView({ params }: { params: { id: string } }) {
useEffect(() => {
console.log("web5 state");
console.log(web5state);
// @ts-ignore
if (
web5state.loaded &&
params.id &&
Expand Down
3 changes: 3 additions & 0 deletions src/lib/actions/web5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export type Web5ActionTypes =

export const initWeb5 = async (dispatch: Dispatch) => {
dispatch({ type: INIT_WEB5_START });
// @ts-ignore
const { Web5 } = await import("@web5/api/browser");

try {
const { web5, did } = await Web5.connect({ password: "asdf" });
await configureProtocol(web5);
Expand Down